From 9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Sun, 31 May 2015 21:45:36 -0700 Subject: Store server latency, sample rate, framecount information in AudioTrack Bug: 21198655 Change-Id: I24590196642a97ea5d61bc6356f0aff782bd37d3 --- include/media/AudioTrack.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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 -- cgit v1.1