summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-10 09:53:55 -0800
committerGlenn Kasten <gkasten@google.com>2014-02-10 10:17:48 -0800
commit43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5 (patch)
treeef6644e90c7939011748527d08c423dfefa25889 /media/libmedia
parent4b76d27d6c4751b31a1cb8ac5e6da1d4b7724a7b (diff)
downloadframeworks_av-43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5.zip
frameworks_av-43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5.tar.gz
frameworks_av-43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5.tar.bz2
Fix build after merge from AOSP
Change-Id: I1cd3432c02db1600e49ade67e6a89e39e7a8d3ed
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioTrack.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index fa56dc2..37ae70f 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -871,24 +871,20 @@ status_t AudioTrack::createTrack_l(size_t epoch)
// Client decides whether the track is TIMED (see below), but can only express a preference
// for FAST. Server will perform additional tests.
- if ((mFlags & AUDIO_OUTPUT_FLAG_FAST) && !(
+ if ((mFlags & AUDIO_OUTPUT_FLAG_FAST) && !((
// either of these use cases:
// use case 1: shared buffer
(mSharedBuffer != 0) ||
// use case 2: callback handler
- (mCbf != NULL))) {
+ (mCbf != NULL)) &&
+ // matching sample rate
+ (mSampleRate == afSampleRate))) {
ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by client");
// once denied, do not request again if IAudioTrack is re-created
mFlags = (audio_output_flags_t) (mFlags & ~AUDIO_OUTPUT_FLAG_FAST);
}
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