summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-12 18:42:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-12 18:43:00 +0000
commitd9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd (patch)
tree1d075b113943a8e3a032b9162100f05490213250 /services/audioflinger/AudioMixer.cpp
parent69dce3343ffe33d2ba60ab4c6755953a7ec96899 (diff)
parentdb4c031f518ae5806af73756273ff32cd8d0e4f8 (diff)
downloadframeworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.zip
frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.gz
frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.bz2
Merge "Update sampling rate to 192kHz for devices" into mnc-dev
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 959c140..586c737 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