summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/FastMixer.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-05-14 14:13:23 -0700
committerAndy Hung <hunga@google.com>2014-05-16 16:20:54 -0700
commit68112fc4f77ab8c4a744782f78e9792afe0cbfc1 (patch)
tree4b7441d8f494bc9081de5c451794796d5a8693c8 /services/audioflinger/FastMixer.cpp
parente541269be94f3a1072932d51537905b120ef4733 (diff)
downloadframeworks_av-68112fc4f77ab8c4a744782f78e9792afe0cbfc1.zip
frameworks_av-68112fc4f77ab8c4a744782f78e9792afe0cbfc1.tar.gz
frameworks_av-68112fc4f77ab8c4a744782f78e9792afe0cbfc1.tar.bz2
Update AudioMixer::getTrackName to save channelMask
Change-Id: I4fb4abbff1b05bdd0f6e21b5f5f4c3f2a57ae28d Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/FastMixer.cpp')
-rw-r--r--services/audioflinger/FastMixer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp
index 5cb42cc..b909904 100644
--- a/services/audioflinger/FastMixer.cpp
+++ b/services/audioflinger/FastMixer.cpp
@@ -224,17 +224,13 @@ void FastMixer::onStateChange()
AudioBufferProvider *bufferProvider = fastTrack->mBufferProvider;
ALOG_ASSERT(bufferProvider != NULL && fastTrackNames[i] == -1);
if (mixer != NULL) {
- // calling getTrackName with default channel mask and a random invalid
- // sessionId (no effects here)
- name = mixer->getTrackName(AUDIO_CHANNEL_OUT_STEREO, -555);
+ name = mixer->getTrackName(fastTrack->mChannelMask, AUDIO_SESSION_OUTPUT_MIX);
ALOG_ASSERT(name >= 0);
fastTrackNames[i] = name;
mixer->setBufferProvider(name, bufferProvider);
mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::MAIN_BUFFER,
(void *) mixBuffer);
// newly allocated track names default to full scale volume
- mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK,
- (void *)(uintptr_t)fastTrack->mChannelMask);
mixer->enable(name);
}
generations[i] = fastTrack->mGeneration;