summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerSinc.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-10-21 03:04:05 -0700
committerMathias Agopian <mathias@google.com>2012-10-21 03:04:05 -0700
commitebed918320bdacdb225f679a8d7135d1acd3fe51 (patch)
tree1f0157a53d0c958ab22a50871622983ac7579934 /services/audioflinger/AudioResamplerSinc.cpp
parentdf4fca94ecad030e980e0c0f6b7d9711726d9638 (diff)
downloadframeworks_av-ebed918320bdacdb225f679a8d7135d1acd3fe51.zip
frameworks_av-ebed918320bdacdb225f679a8d7135d1acd3fe51.tar.gz
frameworks_av-ebed918320bdacdb225f679a8d7135d1acd3fe51.tar.bz2
Fix a typo that caused the high quality resampler to produce garbage
the problem is that if libaudio_resampler is present, it is those coefficients that will always be selected, but the correct meta-data. Bug: 7385994 Change-Id: Ieebeb37b4dfb62a1a051bc29fae2ce056dbc6621
Diffstat (limited to 'services/audioflinger/AudioResamplerSinc.cpp')
-rw-r--r--services/audioflinger/AudioResamplerSinc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/AudioResamplerSinc.cpp b/services/audioflinger/AudioResamplerSinc.cpp
index 90651f1..9e8447a 100644
--- a/services/audioflinger/AudioResamplerSinc.cpp
+++ b/services/audioflinger/AudioResamplerSinc.cpp
@@ -252,7 +252,7 @@ void AudioResamplerSinc::resample(int32_t* out, size_t outFrameCount,
// FIXME store current state (up or down sample) and only load the coefs when the state
// changes. Or load two pointers one for up and one for down in the init function.
// Not critical now since the read functions are fast, but would be important if read was slow.
- if (readResampleCoefficients) {
+ if (mConstants == &veryHighQualityConstants && readResampleCoefficients) {
ALOGV("get coefficient from libmm-audio resampler library");
mFirCoefs = (mInSampleRate <= mSampleRate) ? readResampleCoefficients(true) :
readResampleCoefficients(false);