summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-30 00:02:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-30 00:02:57 +0000
commit5dae225de7b5ccf965d1496bc4343828a250f788 (patch)
tree88dcc5e6174ff34a8d072c3882e3d1d039fa5da2
parent935799d63f0d654f350a640001077616572a4b63 (diff)
parente25f9ed3469859ba0b94585549097b8b82dca8b4 (diff)
downloadlibhardware-5dae225de7b5ccf965d1496bc4343828a250f788.tar.gz
Merge "get_presentation_position" into klp-dev
-rw-r--r--include/hardware/audio.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index b0c0c0eb..f8419807 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -356,6 +356,18 @@ struct audio_stream_out {
* Implementation of this function is mandatory for offloaded playback.
*/
int (*flush)(struct audio_stream_out* stream);
+
+ /**
+ * Return the number of audio frames presented to an external observer.
+ * This excludes frames which have been written but are still in the pipeline.
+ * The count is not reset to zero when output enters standby.
+ * Also returns the value of CLOCK_MONOTONIC as of this presentation count.
+ *
+ * 3.0 and higher only.
+ */
+ int (*get_presentation_position)(const struct audio_stream_out *stream,
+ uint64_t *frames, struct timespec *timestamp);
+
};
typedef struct audio_stream_out audio_stream_out_t;