diff options
author | Andy Hung <hunga@google.com> | 2014-05-27 18:32:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-27 18:32:15 +0000 |
commit | 018d324dc599c5f4238a4cd631baac47c28d59fe (patch) | |
tree | 3c45f7d16bb23590c06eae6fa59852882c16f897 /services/audioflinger/FastMixer.cpp | |
parent | 1a83b736737e7f625371093519ff7a10b05e0c63 (diff) | |
parent | ef7c7fbd0e3fb36af14cd7d39f64c949031516a5 (diff) | |
download | frameworks_av-018d324dc599c5f4238a4cd631baac47c28d59fe.zip frameworks_av-018d324dc599c5f4238a4cd631baac47c28d59fe.tar.gz frameworks_av-018d324dc599c5f4238a4cd631baac47c28d59fe.tar.bz2 |
Merge "Add multiple format capability to AudioMixer"
Diffstat (limited to 'services/audioflinger/FastMixer.cpp')
-rw-r--r-- | services/audioflinger/FastMixer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp index 7e15bef..f0ce902 100644 --- a/services/audioflinger/FastMixer.cpp +++ b/services/audioflinger/FastMixer.cpp @@ -231,6 +231,8 @@ void FastMixer::onStateChange() 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::FORMAT, + (void *)(uintptr_t)fastTrack->mFormat); mixer->enable(name); } generations[i] = fastTrack->mGeneration; @@ -259,6 +261,8 @@ void FastMixer::onStateChange() } mixer->setParameter(name, AudioMixer::RESAMPLE, AudioMixer::REMOVE, NULL); + mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::FORMAT, + (void *)(uintptr_t)fastTrack->mFormat); mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK, (void *)(uintptr_t) fastTrack->mChannelMask); // already enabled @@ -281,7 +285,7 @@ void FastMixer::onWork() const size_t frameCount = current->mFrameCount; if ((command & FastMixerState::MIX) && (mixer != NULL) && isWarm) { - ALOG_ASSERT(mixBuffer != NULL); + ALOG_ASSERT(mMixerBuffer != NULL); // for each track, update volume and check for underrun unsigned currentTrackMask = current->mTrackMask; while (currentTrackMask != 0) { |