summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerDyn.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-02-19 17:42:25 -0800
committerAndy Hung <hunga@google.com>2014-02-19 17:47:31 -0800
commit1af34085e18c4d5ab297232f167a71e89ff7f65d (patch)
treec414045a41fd668fbffb4b4b5dc32da6ac08db6c /services/audioflinger/AudioResamplerDyn.cpp
parent1ebd04b5f4ffe774c37054aac305cd9e6c73d2b2 (diff)
downloadframeworks_av-1af34085e18c4d5ab297232f167a71e89ff7f65d.zip
frameworks_av-1af34085e18c4d5ab297232f167a71e89ff7f65d.tar.gz
frameworks_av-1af34085e18c4d5ab297232f167a71e89ff7f65d.tar.bz2
Fix 1:1 dynamic resampler rate setting
Change-Id: Id69e98ebaaca8dd8c976eb823f1cc1024b0eddf5 Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/AudioResamplerDyn.cpp')
-rw-r--r--services/audioflinger/AudioResamplerDyn.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp
index 54c2309..2997c5c 100644
--- a/services/audioflinger/AudioResamplerDyn.cpp
+++ b/services/audioflinger/AudioResamplerDyn.cpp
@@ -165,6 +165,10 @@ AudioResamplerDyn::AudioResamplerDyn(int bitDepth,
mCoefBuffer(NULL)
{
mVolumeSimd[0] = mVolumeSimd[1] = 0;
+ // The AudioResampler base class assumes we are always ready for 1:1 resampling.
+ // We reset mInSampleRate to 0, so setSampleRate() will calculate filters for
+ // setSampleRate() for 1:1. (May be removed if precalculated filters are used.)
+ mInSampleRate = 0;
mConstants.set(128, 8, mSampleRate, mSampleRate); // TODO: set better
}