diff options
author | Glenn Kasten <gkasten@android.com> | 2014-02-10 18:04:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-10 18:04:54 +0000 |
commit | 4361749d74113069aafb0620a1189404205c58d0 (patch) | |
tree | dfddd0eede083dd799e7cd5179a98954259ee6e9 /media | |
parent | 7142d10a7a3941b2deb18869a7f7b79462e0aa52 (diff) | |
parent | 398f21348e5100289f6e5be30c8b5257fa04aaf9 (diff) | |
download | frameworks_av-4361749d74113069aafb0620a1189404205c58d0.zip frameworks_av-4361749d74113069aafb0620a1189404205c58d0.tar.gz frameworks_av-4361749d74113069aafb0620a1189404205c58d0.tar.bz2 |
Merge "AudioTrack: Never try to use the fast path if resampling is required"
Diffstat (limited to 'media')
-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 0609a22..0b8fd7e 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 |