diff options
author | Andy Hung <hunga@google.com> | 2014-05-09 15:02:21 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2014-05-19 12:27:46 -0700 |
commit | e8a1ced4da17dc6c07803dc2af8060f62a8389c1 (patch) | |
tree | eadb47a0d9349451773ef55adaa60317e1dbafad /services/audioflinger/AudioMixer.cpp | |
parent | 68112fc4f77ab8c4a744782f78e9792afe0cbfc1 (diff) | |
download | frameworks_av-e8a1ced4da17dc6c07803dc2af8060f62a8389c1.zip frameworks_av-e8a1ced4da17dc6c07803dc2af8060f62a8389c1.tar.gz frameworks_av-e8a1ced4da17dc6c07803dc2af8060f62a8389c1.tar.bz2 |
Add format parameter to getTrackName() and track_t
Change-Id: Ia152a839014e235fbfb656104c15d7c1b456d02e
Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r-- | services/audioflinger/AudioMixer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 805eaa4..342364e 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -153,8 +153,13 @@ void AudioMixer::setLog(NBLog::Writer *log) mState.mLog = log; } -int AudioMixer::getTrackName(audio_channel_mask_t channelMask, int sessionId) +int AudioMixer::getTrackName(audio_channel_mask_t channelMask, + audio_format_t format, int sessionId) { + if (!isValidPcmTrackFormat(format)) { + ALOGE("AudioMixer::getTrackName invalid format (%#x)", format); + return -1; + } uint32_t names = (~mTrackNames) & mConfiguredNames; if (names != 0) { int n = __builtin_ctz(names); @@ -193,7 +198,7 @@ int AudioMixer::getTrackName(audio_channel_mask_t channelMask, int sessionId) t->auxBuffer = NULL; t->downmixerBufferProvider = NULL; t->mMixerFormat = AUDIO_FORMAT_PCM_16_BIT; - + t->mFormat = format; status_t status = initTrackDownmix(&mState.tracks[n], n, channelMask); if (status != OK) { ALOGE("AudioMixer::getTrackName invalid channelMask (%#x)", channelMask); |