diff options
author | Andy Hung <hunga@google.com> | 2014-02-25 19:36:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-25 19:36:49 +0000 |
commit | b78d804b1090a430a126a6c356037ded96ffd91a (patch) | |
tree | e140d26911ba76f3c331a727d71bc07983921340 | |
parent | 99ef241a8d310b3319c02eac18de9bb7422c5ab0 (diff) | |
parent | 1af34085e18c4d5ab297232f167a71e89ff7f65d (diff) | |
download | frameworks_av-b78d804b1090a430a126a6c356037ded96ffd91a.zip frameworks_av-b78d804b1090a430a126a6c356037ded96ffd91a.tar.gz frameworks_av-b78d804b1090a430a126a6c356037ded96ffd91a.tar.bz2 |
Merge "Fix 1:1 dynamic resampler rate setting"
-rw-r--r-- | services/audioflinger/AudioResamplerDyn.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp index 939b128..7e4ca0c 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 } |