summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/MediaPlayerService.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-12 10:30:28 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-12 10:30:28 -0800
commit4cc55d53d542c4f4ed645738cebb65b9e7eb6c44 (patch)
tree417efab1bc349bfaa4bdf7fccdff0e53fb76e7c0 /media/libmediaplayerservice/MediaPlayerService.cpp
parentd5a8bf0bca459389cdb81fdcc30893516bdce951 (diff)
parente1c3962e268ffc12bfd1bd9ea84da1f135f36960 (diff)
downloadframeworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.zip
frameworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.tar.gz
frameworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.tar.bz2
Merge "Use audio_format_t consistently"
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp')
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index f5cb019..af58cac 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -1149,7 +1149,7 @@ int Antagonizer::callbackThread(void* user)
static size_t kDefaultHeapSize = 1024 * 1024; // 1MB
-sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat)
+sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat)
{
ALOGV("decode(%s)", url);
sp<MemoryBase> mem;
@@ -1197,7 +1197,7 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i
mem = new MemoryBase(cache->getHeap(), 0, cache->size());
*pSampleRate = cache->sampleRate();
*pNumChannels = cache->channelCount();
- *pFormat = (int)cache->format();
+ *pFormat = cache->format();
ALOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat);
Exit:
@@ -1205,7 +1205,7 @@ Exit:
return mem;
}
-sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat)
+sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat)
{
ALOGV("decode(%d, %lld, %lld)", fd, offset, length);
sp<MemoryBase> mem;
@@ -1339,7 +1339,7 @@ status_t MediaPlayerService::AudioOutput::getPosition(uint32_t *position)
}
status_t MediaPlayerService::AudioOutput::open(
- uint32_t sampleRate, int channelCount, int format, int bufferCount,
+ uint32_t sampleRate, int channelCount, audio_format_t format, int bufferCount,
AudioCallback cb, void *cookie)
{
mCallback = cb;
@@ -1611,7 +1611,7 @@ bool CallbackThread::threadLoop() {
////////////////////////////////////////////////////////////////////////////////
status_t MediaPlayerService::AudioCache::open(
- uint32_t sampleRate, int channelCount, int format, int bufferCount,
+ uint32_t sampleRate, int channelCount, audio_format_t format, int bufferCount,
AudioCallback cb, void *cookie)
{
ALOGV("open(%u, %d, %d, %d)", sampleRate, channelCount, format, bufferCount);
@@ -1621,7 +1621,7 @@ status_t MediaPlayerService::AudioCache::open(
mSampleRate = sampleRate;
mChannelCount = (uint16_t)channelCount;
- mFormat = (uint16_t)format;
+ mFormat = format;
mMsecsPerFrame = 1.e3 / (float) sampleRate;
if (cb != NULL) {