diff options
author | Glenn Kasten <gkasten@google.com> | 2014-08-15 15:13:30 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-09-11 09:54:52 -0700 |
commit | 200092b7f21d2b98f30b800e79d152636f9ba225 (patch) | |
tree | 35ced5107a366d0885a6a54e5473891e5ce01317 /include/media/IAudioTrack.h | |
parent | 4953f92be5c45d7b79448e8964ecbdc39eacb782 (diff) | |
download | frameworks_av-200092b7f21d2b98f30b800e79d152636f9ba225.zip frameworks_av-200092b7f21d2b98f30b800e79d152636f9ba225.tar.gz frameworks_av-200092b7f21d2b98f30b800e79d152636f9ba225.tar.bz2 |
Clean up AudioTrack position and timestamp handling
Replace epoch concept by observing and accumulating server delta
positions. The advantage of using server deltas instead of absolute
values is that they (1) are not sensitive to 32-bit wraparound,
(2) are not sensitive to server behavior for stop(), and
(3) prepare for future 64-bit client positions without requiring 64-bit
positions on server.
Add comments to AudioTrack::getTimestamp() and friends
that the timestamp output parameter is undefined on error.
Don't allow getTimestamp to return a negative frame position after stop().
Accumulate the client released frames, which may be useful for a future API.
Bug: 11815245
Change-Id: I652940fa2db2f34a78c012a3ead0d9204fa29c6e
Diffstat (limited to 'include/media/IAudioTrack.h')
-rw-r--r-- | include/media/IAudioTrack.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/media/IAudioTrack.h b/include/media/IAudioTrack.h index 5c8a484..619ac78 100644 --- a/include/media/IAudioTrack.h +++ b/include/media/IAudioTrack.h @@ -88,7 +88,7 @@ public: /* Send parameters to the audio hardware */ virtual status_t setParameters(const String8& keyValuePairs) = 0; - /* Return NO_ERROR if timestamp is valid */ + /* Return NO_ERROR if timestamp is valid. timestamp is undefined otherwise. */ virtual status_t getTimestamp(AudioTimestamp& timestamp) = 0; /* Signal the playback thread for a change in control block */ |