diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2011-05-24 15:53:33 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2011-06-01 10:55:29 -0700 |
commit | 5439223b5633679edcc255651e7062046004d75d (patch) | |
tree | 683090bec6f1a9a0fe95609fe5becf54aa3b1f8a /media/libmediaplayerservice | |
parent | 3a4b8bb6756120cfdef2faa7c1966963ef011faf (diff) | |
download | frameworks_base-5439223b5633679edcc255651e7062046004d75d.zip frameworks_base-5439223b5633679edcc255651e7062046004d75d.tar.gz frameworks_base-5439223b5633679edcc255651e7062046004d75d.tar.bz2 |
Use channel mask instead of channel count for track creation
Record and playback objects (resp AudioRecord and AudioTrack)
are created using a channel mask, but this information is lost
in the mixer because only the channel count is known to
AudioFlinger. A channel count can always be derived from a
channel mask.
The change consists in:
- disambiguiting variable names for channel masks and counts
- passing the mask information from the client to AudioFlinger
and the mixer.
- when using the DIRECT ouput, only verifying the format of
the track is compatible with the output's for PCM.
Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index d51c946..eae93ff 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1164,7 +1164,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 = cache->format(); + *pFormat = (int)cache->format(); LOGV("return memory @ %p, sampleRate=%u, channelCount = %d, format = %d", mem->pointer(), *pSampleRate, *pNumChannels, *pFormat); Exit: |