diff options
author | Paul Adenot <[email protected]> | 2020-04-29 16:23:15 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-29 16:23:15 +0200 |
commit | 35190a8da650be297edb91d2db778bed622d8691 (patch) | |
tree | 4f64189b1c4dd81e2464116521564becd0b1298d /src/cubeb.c | |
parent | 616d773441b5355800ce64197a699e6cd6b36172 (diff) | |
download | cubeb-35190a8da650be297edb91d2db778bed622d8691.tar.gz cubeb-35190a8da650be297edb91d2db778bed622d8691.zip |
Add a method to get audio input latency on a stream (#583)
Diffstat (limited to 'src/cubeb.c')
-rw-r--r-- | src/cubeb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cubeb.c b/src/cubeb.c index f73bd0c..3320fcc 100644 --- a/src/cubeb.c +++ b/src/cubeb.c @@ -421,6 +421,20 @@ cubeb_stream_get_latency(cubeb_stream * stream, uint32_t * latency) } int +cubeb_stream_get_input_latency(cubeb_stream * stream, uint32_t * latency) +{ + if (!stream || !latency) { + return CUBEB_ERROR_INVALID_PARAMETER; + } + + if (!stream->context->ops->stream_get_input_latency) { + return CUBEB_ERROR_NOT_SUPPORTED; + } + + return stream->context->ops->stream_get_input_latency(stream, latency); +} + +int cubeb_stream_set_volume(cubeb_stream * stream, float volume) { if (!stream || volume > 1.0 || volume < 0.0) { |