aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2020-04-29 16:23:15 +0200
committerGitHub <[email protected]>2020-04-29 16:23:15 +0200
commit35190a8da650be297edb91d2db778bed622d8691 (patch)
tree4f64189b1c4dd81e2464116521564becd0b1298d /include
parent616d773441b5355800ce64197a699e6cd6b36172 (diff)
downloadcubeb-35190a8da650be297edb91d2db778bed622d8691.tar.gz
cubeb-35190a8da650be297edb91d2db778bed622d8691.zip
Add a method to get audio input latency on a stream (#583)
Diffstat (limited to 'include')
-rw-r--r--include/cubeb/cubeb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h
index b3fc56d..f372831 100644
--- a/include/cubeb/cubeb.h
+++ b/include/cubeb/cubeb.h
@@ -559,6 +559,16 @@ CUBEB_EXPORT int cubeb_stream_get_position(cubeb_stream * stream, uint64_t * pos
@retval CUBEB_ERROR */
CUBEB_EXPORT int cubeb_stream_get_latency(cubeb_stream * stream, uint32_t * latency);
+/** Get the input latency for this stream, in frames. This is the number of
+ frames between the time the audio input devices records the data, and they
+ are available in the data callback.
+ This returns CUBEB_ERROR when the stream is output-only.
+ @param stream
+ @param latency Current approximate stream latency in frames.
+ @retval CUBEB_OK
+ @retval CUBEB_ERROR_NOT_SUPPORTED
+ @retval CUBEB_ERROR */
+CUBEB_EXPORT int cubeb_stream_get_input_latency(cubeb_stream * stream, uint32_t * latency);
/** Set the volume for a stream.
@param stream the stream for which to adjust the volume.
@param volume a float between 0.0 (muted) and 1.0 (maximum volume)