From db4c031f518ae5806af73756273ff32cd8d0e4f8 Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Wed, 6 May 2015 08:46:52 -0700 Subject: Update sampling rate to 192kHz for devices Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69 --- services/audioflinger/AudioMixer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'services/audioflinger/AudioMixer.cpp') diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 7040af4..1348d08 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -708,11 +708,10 @@ bool AudioMixer::track_t::setResampler(uint32_t trackSampleRate, uint32_t devSam // FIXME this is flawed for dynamic sample rates, as we choose the resampler // quality level based on the initial ratio, but that could change later. // Should have a way to distinguish tracks with static ratios vs. dynamic ratios. - if (!((trackSampleRate == 44100 && devSampleRate == 48000) || - (trackSampleRate == 48000 && devSampleRate == 44100))) { - quality = AudioResampler::DYN_LOW_QUALITY; - } else { + if (isMusicRate(trackSampleRate)) { quality = AudioResampler::DEFAULT_QUALITY; + } else { + quality = AudioResampler::DYN_LOW_QUALITY; } // TODO: Remove MONO_HACK. Resampler sees #channels after the downmixer -- cgit v1.1