summaryrefslogtreecommitdiffstats
path: root/include/hardware/audio.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-22 16:27:22 -0700
committerGlenn Kasten <gkasten@google.com>2013-08-29 12:05:12 -0700
commite25f9ed3469859ba0b94585549097b8b82dca8b4 (patch)
tree96c46a5b12bb83af8f0861424caf4ee1a8ffefa7 /include/hardware/audio.h
parent59caeb14a7cb7cbc74db725343922c81f0e2e3aa (diff)
downloadhardware_libhardware-e25f9ed3469859ba0b94585549097b8b82dca8b4.zip
hardware_libhardware-e25f9ed3469859ba0b94585549097b8b82dca8b4.tar.gz
hardware_libhardware-e25f9ed3469859ba0b94585549097b8b82dca8b4.tar.bz2
get_presentation_position
Change-Id: Iedc4df9018321d7273eaa862e913ad6d9a844618
Diffstat (limited to 'include/hardware/audio.h')
-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 b0c0c0e..f841980 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;