diff options
author | Andy Hung <hunga@google.com> | 2014-02-19 12:45:19 -0800 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2014-02-19 12:48:59 -0800 |
commit | 24781fff62a4cf7279d3dac83c33e2ac612712ba (patch) | |
tree | 8730de2f28936dca32643c5806e71c6bdc73f9f5 /services/audioflinger/AudioResamplerDyn.cpp | |
parent | 1ebd04b5f4ffe774c37054aac305cd9e6c73d2b2 (diff) | |
download | frameworks_av-24781fff62a4cf7279d3dac83c33e2ac612712ba.zip frameworks_av-24781fff62a4cf7279d3dac83c33e2ac612712ba.tar.gz frameworks_av-24781fff62a4cf7279d3dac83c33e2ac612712ba.tar.bz2 |
Fix resampler to allow output of single frame
Bug: 13073201
Change-Id: If7818a3389a191a37277bbd8e96a59ef8ce68509
Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/AudioResamplerDyn.cpp')
-rw-r--r-- | services/audioflinger/AudioResamplerDyn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp index 54c2309..939b128 100644 --- a/services/audioflinger/AudioResamplerDyn.cpp +++ b/services/audioflinger/AudioResamplerDyn.cpp @@ -466,7 +466,7 @@ void AudioResamplerDyn::resample(int32_t* out, size_t outFrameCount, const uint32_t phaseIncrement = mPhaseIncrement; size_t outputIndex = 0; size_t outputSampleCount = outFrameCount * 2; // stereo output - size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate; + size_t inFrameCount = getInFrameCountRequired(outFrameCount); const uint32_t phaseWrapLimit = c.mL << c.mShift; // NOTE: be very careful when modifying the code here. register |