summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-12-12 15:37:34 -0800
committerAndy Hung <hunga@google.com>2015-01-06 11:59:11 -0800
commit4ede21d9c1f957baf5e561849ff9bbe4bcbefc20 (patch)
tree7a30e810c5dc2da9c03d1561a81bd4e00321097c /include/media
parent9b4615887c23548438fd0d8e3d8f04ac21912850 (diff)
downloadframeworks_av-4ede21d9c1f957baf5e561849ff9bbe4bcbefc20.zip
frameworks_av-4ede21d9c1f957baf5e561849ff9bbe4bcbefc20.tar.gz
frameworks_av-4ede21d9c1f957baf5e561849ff9bbe4bcbefc20.tar.bz2
Fix loop and position restoration in static AudioTracks
Allow restoration of loop and position. Make position and loop synchronously readable. Bug: 17964637 Change-Id: I8cfb5036e665f55fdff5c67d27e1363ce9a8665d
Diffstat (limited to 'include/media')
-rw-r--r--include/media/AudioTrack.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index da6d4e3..0f9df4f 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -732,13 +732,16 @@ protected:
bool mRefreshRemaining; // processAudioBuffer() should refresh
// mRemainingFrames and mRetryOnPartialBuffer
+ // used for static track cbf and restoration
+ int32_t mLoopCount; // last setLoop loopCount; zero means disabled
+ uint32_t mLoopStart; // last setLoop loopStart
+ uint32_t mLoopEnd; // last setLoop loopEnd
+
// These are private to processAudioBuffer(), and are not protected by a lock
uint32_t mRemainingFrames; // number of frames to request in obtainBuffer()
bool mRetryOnPartialBuffer; // sleep and retry after partial obtainBuffer()
uint32_t mObservedSequence; // last observed value of mSequence
- uint32_t mLoopPeriod; // in frames, zero means looping is disabled
-
uint32_t mMarkerPosition; // in wrapping (overflow) frame units
bool mMarkerReached;
uint32_t mNewPosition; // in frames