From ac6020508acedd316391dee42329040bf45f8d90 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 1 Oct 2012 14:04:31 -0700 Subject: Integrate improved coefficient sinc resampler: VHQ Summary: Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1, and uses low quality for all other use cases. Track estimated CPU load and throttles the quality based on load; as currently configured it should allow up to 2 instances of very high quality. Medium quality and high quality are currently disabled unless explicitly requested. Details: Only load .so the first time it is needed. Cleanup code style: formatting, indentation, whitespace. Restore medium quality resampler, but it is not used (see next line). Fix memory leak for sinc resampler. Check sample rate in resampler constructor. Add logs for debugging. Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels. Renumber VERY_HIGH_QUALITY from 255 to 4. Use enum src_quality consistently. Improve parsing of property af.resampler.quality. Fix reentrancy bug - allow an instance of high quality and an instance of very high quality to both be active concurrently. Bug: 7229644 Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7 --- services/audioflinger/AudioResamplerCubic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/audioflinger/AudioResamplerCubic.h') diff --git a/services/audioflinger/AudioResamplerCubic.h b/services/audioflinger/AudioResamplerCubic.h index 892785a..203b933 100644 --- a/services/audioflinger/AudioResamplerCubic.h +++ b/services/audioflinger/AudioResamplerCubic.h @@ -29,7 +29,7 @@ namespace android { class AudioResamplerCubic : public AudioResampler { public: AudioResamplerCubic(int bitDepth, int inChannelCount, int32_t sampleRate) : - AudioResampler(bitDepth, inChannelCount, sampleRate) { + AudioResampler(bitDepth, inChannelCount, sampleRate, MED_QUALITY) { } virtual void resample(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider); -- cgit v1.1