diff options
| author | 2009-08-10 16:04:29 -0700 | |
|---|---|---|
| committer | 2009-08-10 16:04:29 -0700 | |
| commit | 2e9c859f202a1e17176eee4130ea58c9d476494c (patch) | |
| tree | 5347396bf2bfa16802c306ba28ddc07148daa2a8 | |
| parent | a1cbccd7b31f3c33ea46b7fe2a287168eb672056 (diff) | |
| parent | 6f7e097ee5a495b224dc64edc64e8fc36eb9ee44 (diff) | |
Merge change 20607
* changes:
Limit AudioFlinger mixer track sampling rate.
| -rw-r--r-- | libs/audioflinger/AudioFlinger.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index d019097c5c9d..2e947d6b7d23 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -1512,6 +1512,10 @@ bool AudioFlinger::MixerThread::checkForNewParameters_l() int name = getTrackName_l(); if (name < 0) break; mTracks[i]->mName = name; + // limit track sample rate to 2 x new output sample rate + if (mTracks[i]->mCblk->sampleRate > 2 * sampleRate()) { + mTracks[i]->mCblk->sampleRate = 2 * sampleRate(); + } } sendConfigEvent_l(AudioSystem::OUTPUT_CONFIG_CHANGED); } |