From 76b111685010e1fea7c0a865c038aee35507fde4 Mon Sep 17 00:00:00 2001 From: SathishKumar Mani Date: Tue, 17 Jan 2012 10:49:47 -0800 Subject: audioflinger: use resample coefficients from audio-resampler library. -Add a separate quality VERY_HIGH_QUALITY in resampler -Use resample coefficients audio-resampler library for quality VERY_HIGH_QUALITY. -This improves the quality of resampled output. Bug: 7024293 Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4 Signed-off-by: Iliyan Malchev --- services/audioflinger/AudioResampler.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'services/audioflinger/AudioResampler.cpp') diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index fbb54cf..5c1c905 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -23,8 +23,8 @@ #include #include #include "AudioResampler.h" -#if 0 #include "AudioResamplerSinc.h" +#if 0 #include "AudioResamplerCubic.h" #endif @@ -106,11 +106,14 @@ AudioResampler* AudioResampler::create(int bitDepth, int inChannelCount, ALOGV("Create cubic Resampler"); resampler = new AudioResamplerCubic(bitDepth, inChannelCount, sampleRate); break; +#endif case HIGH_QUALITY: - ALOGV("Create sinc Resampler"); + ALOGV("Create HIGH_QUALITY sinc Resampler"); resampler = new AudioResamplerSinc(bitDepth, inChannelCount, sampleRate); + case VERY_HIGH_QUALITY: + ALOGV("Create VERY_HIGH_QUALITY sinc Resampler = %d",quality); + resampler = new AudioResamplerSinc(bitDepth, inChannelCount, sampleRate, quality); break; -#endif } // initialize resampler -- cgit v1.1