summaryrefslogtreecommitdiffstats
path: root/include/media/AudioTrack.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-31 21:45:36 -0700
committerAndy Hung <hunga@google.com>2015-06-01 18:53:03 -0700
commit9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd (patch)
treed225efadda08464e37526e7e4cbc02ef1cf3f9ca /include/media/AudioTrack.h
parent08945c44a97d3749cc48f860eb4e01e57183ad90 (diff)
downloadframeworks_av-9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd.zip
frameworks_av-9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd.tar.gz
frameworks_av-9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd.tar.bz2
Store server latency, sample rate, framecount information in AudioTrack
Bug: 21198655 Change-Id: I24590196642a97ea5d61bc6356f0aff782bd37d3
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r--include/media/AudioTrack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index e9f0131..d7b5f97 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -799,6 +799,13 @@ protected:
size_t mReqFrameCount; // frame count to request the first or next time
// a new IAudioTrack is needed, non-decreasing
+ // The following AudioFlinger server-side values are cached in createAudioTrack_l().
+ // These values can be used for informational purposes until the track is invalidated,
+ // whereupon restoreTrack_l() calls createTrack_l() to update the values.
+ uint32_t mAfLatency; // AudioFlinger latency in ms
+ size_t mAfFrameCount; // AudioFlinger frame count
+ uint32_t mAfSampleRate; // AudioFlinger sample rate
+
// constant after constructor or set()
audio_format_t mFormat; // as requested by client, not forced to 16-bit
audio_stream_type_t mStreamType; // mStreamType == AUDIO_STREAM_DEFAULT implies