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
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 @@
             // 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;