diff options
author | Glenn Kasten <gkasten@android.com> | 2014-03-07 02:26:05 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-07 02:26:05 +0000 |
commit | 32fbb48de0248518fc5a14099b32fe4b8e9fc102 (patch) | |
tree | 44c01484475c34374a8a7cdcbab31ec84ac03a55 /media/libmedia | |
parent | d224ee56ec8c2bc7963f43ca9d80cf31a3ba4c57 (diff) | |
parent | 4361749d74113069aafb0620a1189404205c58d0 (diff) | |
download | frameworks_av-32fbb48de0248518fc5a14099b32fe4b8e9fc102.zip frameworks_av-32fbb48de0248518fc5a14099b32fe4b8e9fc102.tar.gz frameworks_av-32fbb48de0248518fc5a14099b32fe4b8e9fc102.tar.bz2 |
am 4361749d: Merge "AudioTrack: Never try to use the fast path if resampling is required"
* commit '4361749d74113069aafb0620a1189404205c58d0':
AudioTrack: Never try to use the fast path if resampling is required
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 11b0b89..e9c0d31 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -878,6 +878,12 @@ status_t AudioTrack::createTrack_l( } ALOGV("createTrack_l() output %d afLatency %d", output, afLatency); + if ((flags & AUDIO_OUTPUT_FLAG_FAST) && sampleRate != afSampleRate) { + ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (%d vs %d)", + sampleRate, afSampleRate); + flags = (audio_output_flags_t) (flags & ~AUDIO_OUTPUT_FLAG_FAST); + } + // The client's AudioTrack buffer is divided into n parts for purpose of wakeup by server, where // n = 1 fast track with single buffering; nBuffering is ignored // n = 2 fast track with double buffering |