From 8ff972c8e2ec1782ff262ac4071c0415e69b1367 Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Fri, 12 Jan 2024 00:12:17 +0100 Subject: [PATCH] Bump cubeb-rs to 0.12.0 and handle ABI changes --- Cargo.toml | 4 ++-- src/backend/context.rs | 8 ++++++-- src/backend/stream.rs | 12 ++++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6cd6df7..bc94b04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cubeb-pulse" -version = "0.4.2" +version = "0.5.0" authors = ["Dan Glastonbury "] description = "Cubeb backed for PulseAudio written in Rust" license = "ISC" @@ -12,7 +12,7 @@ pulse-dlopen = ["pulse-ffi/dlopen"] crate-type = ["staticlib", "rlib"] [dependencies] -cubeb-backend = "0.10.3" +cubeb-backend = "0.12.0" pulse-ffi = { path = "pulse-ffi" } pulse = { path = "pulse-rs" } semver = "1.0" diff --git a/src/backend/context.rs b/src/backend/context.rs index 99074ac..556b7a6 100644 --- a/src/backend/context.rs +++ b/src/backend/context.rs @@ -5,8 +5,8 @@ use backend::*; use cubeb_backend::{ - ffi, log_enabled, Context, ContextOps, DeviceCollectionRef, DeviceId, DeviceType, Error, Ops, - Result, Stream, StreamParams, StreamParamsRef, + ffi, log_enabled, Context, ContextOps, DeviceCollectionRef, DeviceId, DeviceType, Error, + InputProcessingParams, Ops, Result, Stream, StreamParams, StreamParamsRef, }; use pulse::{self, ProplistExt}; use pulse_ffi::*; @@ -298,6 +298,10 @@ impl ContextOps for PulseContext { } } + fn supported_input_processing_params(&mut self) -> Result { + Ok(InputProcessingParams::NONE) + } + fn enumerate_devices( &mut self, devtype: DeviceType, diff --git a/src/backend/stream.rs b/src/backend/stream.rs index 1d91e4a..8e87110 100644 --- a/src/backend/stream.rs +++ b/src/backend/stream.rs @@ -6,8 +6,8 @@ use backend::cork_state::CorkState; use backend::*; use cubeb_backend::{ - ffi, log_enabled, ChannelLayout, DeviceId, DeviceRef, Error, Result, SampleFormat, StreamOps, - StreamParamsRef, StreamPrefs, + ffi, log_enabled, ChannelLayout, DeviceId, DeviceRef, Error, InputProcessingParams, Result, + SampleFormat, StreamOps, StreamParamsRef, StreamPrefs, }; use pulse::{self, CVolumeExt, ChannelMapExt, SampleSpecExt, StreamLatency, USecExt}; use pulse_ffi::*; @@ -839,6 +839,14 @@ impl<'ctx> StreamOps for PulseStream<'ctx> { } } + fn set_input_mute(&mut self, _mute: bool) -> Result<()> { + Err(not_supported()) + } + + fn set_input_processing_params(&mut self, _params: InputProcessingParams) -> Result<()> { + Err(not_supported()) + } + fn device_destroy(&mut self, device: &DeviceRef) -> Result<()> { if device.as_ptr().is_null() { cubeb_log!("Error: can't destroy null device");