Fix race condition in AudioTrack::pause followed by start
Bug: 11148722
Change-Id: Iec88f00c8510363d4418e4b8d5b34feb06ecf04d
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 22ad57e..f2f9c22 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -612,6 +612,7 @@
bool mPaused; // whether thread is requested to pause at next loop entry
bool mPausedInt; // whether thread internally requests pause
nsecs_t mPausedNs; // if mPausedInt then associated timeout, otherwise ignored
+ bool mIgnoreNextPausedInt; // whether to ignore next mPausedInt request
};
// body of AudioTrackThread::threadLoop()