aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb.c
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 /src/cubeb.c
parent616d773441b5355800ce64197a699e6cd6b36172 (diff)
downloadcubeb-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.c14
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) {