aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb.c
diff options
context:
space:
mode:
authorAndreas Pehrson <[email protected]>2023-11-21 11:21:23 +0100
committerAndreas Pehrson <[email protected]>2024-01-15 15:25:40 +0100
commit5a2df9b0aaa5352c168b7aa2a29d80f8a0e3880b (patch)
tree05d02aadeb7e680757be5cea15695feab4394a91 /src/cubeb.c
parentffec8ede4c8ab15c0db3043c793b0c82e299e14d (diff)
downloadcubeb-5a2df9b0aaa5352c168b7aa2a29d80f8a0e3880b.tar.gz
cubeb-5a2df9b0aaa5352c168b7aa2a29d80f8a0e3880b.zip
Add APIs for input processing
Diffstat (limited to 'src/cubeb.c')
-rw-r--r--src/cubeb.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cubeb.c b/src/cubeb.c
index eca2c63..c13a848 100644
--- a/src/cubeb.c
+++ b/src/cubeb.c
@@ -341,6 +341,21 @@ cubeb_get_preferred_sample_rate(cubeb * context, uint32_t * rate)
return context->ops->get_preferred_sample_rate(context, rate);
}
+int
+cubeb_get_supported_input_processing_params(
+ cubeb * context, cubeb_input_processing_params * params)
+{
+ if (!context || !params) {
+ return CUBEB_ERROR_INVALID_PARAMETER;
+ }
+
+ if (!context->ops->get_supported_input_processing_params) {
+ return CUBEB_ERROR_NOT_SUPPORTED;
+ }
+
+ return context->ops->get_supported_input_processing_params(context, params);
+}
+
void
cubeb_destroy(cubeb * context)
{
@@ -501,6 +516,22 @@ cubeb_stream_get_current_device(cubeb_stream * stream,
}
int
+cubeb_stream_set_input_processing_params(cubeb_stream * stream,
+ cubeb_input_processing_params params)
+{
+ if (!stream || !params) {
+ return CUBEB_ERROR_INVALID_PARAMETER;
+ }
+
+ if (!stream->context->ops->stream_set_input_processing_params) {
+ return CUBEB_ERROR_NOT_SUPPORTED;
+ }
+
+ return stream->context->ops->stream_set_input_processing_params(stream,
+ params);
+}
+
+int
cubeb_stream_device_destroy(cubeb_stream * stream, cubeb_device * device)
{
if (!stream || !device) {