From ebed918320bdacdb225f679a8d7135d1acd3fe51 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Sun, 21 Oct 2012 03:04:05 -0700 Subject: 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 --- services/audioflinger/AudioResamplerSinc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/audioflinger/AudioResamplerSinc.cpp') 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); -- cgit v1.1