summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-03-18 23:26:55 -0700
committerAndy Hung <hunga@google.com>2015-03-18 23:33:44 -0700
commit803b3e558022c6d0eb069308339dc84e6e8035dc (patch)
treeffae05f0ba870ac1f7b704a7309542444db623a4 /include
parent377165c24968b044faccaf366a2377fa32143e2f (diff)
downloadframeworks_av-803b3e558022c6d0eb069308339dc84e6e8035dc.zip
frameworks_av-803b3e558022c6d0eb069308339dc84e6e8035dc.tar.gz
frameworks_av-803b3e558022c6d0eb069308339dc84e6e8035dc.tar.bz2
Event driven wake for AudioRecordThread notification changes
Used for setMarkerPosition and setPositionUpdatePeriod. Change-Id: Iedd1be8725dea32bdba6908b78c5166780a66fec
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index a68a9cb..8e0b8f8 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -417,6 +417,7 @@ private:
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);
@@ -431,7 +432,9 @@ private:
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 AudioRecordThread::threadLoop()