diff options
author | Glenn Kasten <gkasten@android.com> | 2014-02-10 18:10:54 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-10 18:10:54 +0000 |
commit | 5a458ede3b7d303723fde4b856532bdc3b94971b (patch) | |
tree | e39621995921b2001dabd269e59eedf45e2c0ada /services/audioflinger/FastMixer.cpp | |
parent | 4e12dadeec10993d2f77cce96600e73ca0dd86e2 (diff) | |
parent | 5930e8ebdacf3a59c13eef11fd03658ba58b443e (diff) | |
download | frameworks_av-5a458ede3b7d303723fde4b856532bdc3b94971b.zip frameworks_av-5a458ede3b7d303723fde4b856532bdc3b94971b.tar.gz frameworks_av-5a458ede3b7d303723fde4b856532bdc3b94971b.tar.bz2 |
am 5930e8eb: Merge "AudioFlinger: Remove code for supporting resampling in fast tracks"
* commit '5930e8ebdacf3a59c13eef11fd03658ba58b443e':
AudioFlinger: Remove code for supporting resampling in fast tracks
Diffstat (limited to 'services/audioflinger/FastMixer.cpp')
-rw-r--r-- | services/audioflinger/FastMixer.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp index f27ea17..3054619 100644 --- a/services/audioflinger/FastMixer.cpp +++ b/services/audioflinger/FastMixer.cpp @@ -236,7 +236,6 @@ bool FastMixer::threadLoop() sampleRate = Format_sampleRate(format); ALOG_ASSERT(Format_channelCount(format) == FCC_2); } - dumpState->mSampleRate = sampleRate; } if ((format != previousFormat) || (frameCount != previous->mFrameCount)) { @@ -321,10 +320,6 @@ bool FastMixer::threadLoop() mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::MAIN_BUFFER, (void *) mixBuffer); // newly allocated track names default to full scale volume - if (fastTrack->mSampleRate != 0 && fastTrack->mSampleRate != sampleRate) { - mixer->setParameter(name, AudioMixer::RESAMPLE, - AudioMixer::SAMPLE_RATE, (void*) fastTrack->mSampleRate); - } mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK, (void *) fastTrack->mChannelMask); mixer->enable(name); @@ -353,14 +348,8 @@ bool FastMixer::threadLoop() mixer->setParameter(name, AudioMixer::VOLUME, AudioMixer::VOLUME1, (void *)0x1000); } - if (fastTrack->mSampleRate != 0 && - fastTrack->mSampleRate != sampleRate) { - mixer->setParameter(name, AudioMixer::RESAMPLE, - AudioMixer::SAMPLE_RATE, (void*) fastTrack->mSampleRate); - } else { - mixer->setParameter(name, AudioMixer::RESAMPLE, - AudioMixer::REMOVE, NULL); - } + mixer->setParameter(name, AudioMixer::RESAMPLE, + AudioMixer::REMOVE, NULL); mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK, (void *) fastTrack->mChannelMask); // already enabled @@ -392,16 +381,8 @@ bool FastMixer::threadLoop() // Refresh the per-track timestamp if (timestampStatus == NO_ERROR) { - uint32_t trackFramesWrittenButNotPresented; - uint32_t trackSampleRate = fastTrack->mSampleRate; - // There is currently no sample rate conversion for fast tracks currently - if (trackSampleRate != 0 && trackSampleRate != sampleRate) { - trackFramesWrittenButNotPresented = - ((int64_t) nativeFramesWrittenButNotPresented * trackSampleRate) / - sampleRate; - } else { - trackFramesWrittenButNotPresented = nativeFramesWrittenButNotPresented; - } + uint32_t trackFramesWrittenButNotPresented = + nativeFramesWrittenButNotPresented; uint32_t trackFramesWritten = fastTrack->mBufferProvider->framesReleased(); // Can't provide an AudioTimestamp before first frame presented, // or during the brief 32-bit wraparound window |