Event driven wake for AudioTrackThread notification changes
Used for setMarkerPosition and setPositionUpdatePeriod.
Change-Id: I0d94b929438a5cd94b295d7c1884f876fae8b5e7
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index c995bd2..d602ee4 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -614,6 +614,7 @@
void pause(); // suspend thread from execution at next loop boundary
void resume(); // allow thread to execute, if not requested to exit
+ void wake(); // wake to handle changed notification conditions.
private:
void pauseInternal(nsecs_t ns = 0LL);
@@ -628,7 +629,9 @@
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
+ bool mIgnoreNextPausedInt; // skip any internal pause and go immediately
+ // to processAudioBuffer() as state may have changed
+ // since pause time calculated.
};
// body of AudioTrackThread::threadLoop()