From 2e422c472c91aa7912befd0fc038d1e11f354bc1 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 18 Oct 2013 13:00:29 -0700 Subject: Allow releaseBuffer after flush After AudioTrack start checks for pending flush, allow releaseBuffer on any previously obtained buffer. For example, this can happen if the resampler has obtained a buffer but not released the whole buffer yet. Note that the resampler will be reading obsolete data. Bug: 11285590 Change-Id: I0614fbb62e43604aac3089cce4b7797c87a306b5 --- services/audioflinger/Tracks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/audioflinger') diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index e93833f..363bc9d 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -608,7 +608,7 @@ status_t AudioFlinger::PlaybackThread::Track::start(AudioSystem::sync_event_t ev // and for fast tracks the track is not yet in the fast mixer thread's active set. ServerProxy::Buffer buffer; buffer.mFrameCount = 1; - (void) mAudioTrackServerProxy->obtainBuffer(&buffer); + (void) mAudioTrackServerProxy->obtainBuffer(&buffer, true /*ackFlush*/); } } else { status = BAD_VALUE; -- cgit v1.1