diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2012-09-10 18:58:27 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2012-09-10 18:58:27 -0700 |
commit | fe3156ec6fd9fa57dde913fd8567530d095a6550 (patch) | |
tree | 2c4b8250d0089a7d9f396d40005f4fefd95f46f3 /services/audioflinger/AudioMixer.cpp | |
parent | 66765846726c02db16a0f024f2217990a90802c0 (diff) | |
download | frameworks_av-fe3156ec6fd9fa57dde913fd8567530d095a6550.zip frameworks_av-fe3156ec6fd9fa57dde913fd8567530d095a6550.tar.gz frameworks_av-fe3156ec6fd9fa57dde913fd8567530d095a6550.tar.bz2 |
Communicate audio session ID to downmixer
The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.
Change-Id: I5e29540542ae89cf4a0cdb537b3e67f04442a20a
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r-- | services/audioflinger/AudioMixer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index a9814a1..ab75dd0 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -163,7 +163,7 @@ AudioMixer::~AudioMixer() delete [] mState.resampleTemp; } -int AudioMixer::getTrackName(audio_channel_mask_t channelMask) +int AudioMixer::getTrackName(audio_channel_mask_t channelMask, int sessionId) { uint32_t names = (~mTrackNames) & mConfiguredNames; if (names != 0) { @@ -189,6 +189,7 @@ int AudioMixer::getTrackName(audio_channel_mask_t channelMask) t->enabled = false; t->format = 16; t->channelMask = AUDIO_CHANNEL_OUT_STEREO; + t->sessionId = sessionId; // setBufferProvider(name, AudioBufferProvider *) is required before enable(name) t->bufferProvider = NULL; t->downmixerBufferProvider = NULL; @@ -270,7 +271,7 @@ status_t AudioMixer::prepareTrackForDownmix(track_t* pTrack, int trackName) } if (EffectCreate(&dwnmFxDesc.uuid, - -2 /*sessionId*/, -2 /*ioId*/,// both not relevant here, using random value + pTrack->sessionId /*sessionId*/, -2 /*ioId not relevant here, using random value*/, &pDbp->mDownmixHandle/*pHandle*/) != 0) { ALOGE("prepareTrackForDownmix(%d) fails: error creating downmixer effect", trackName); goto noDownmixForActiveTrack; |