Skip to content

Commit

Permalink
Bump cubeb-rs to 0.12.0 and handle ABI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pehrsons authored and padenot committed Jan 16, 2024
1 parent c04c4d2 commit 8ff972c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cubeb-pulse"
version = "0.4.2"
version = "0.5.0"
authors = ["Dan Glastonbury <[email protected]>"]
description = "Cubeb backed for PulseAudio written in Rust"
license = "ISC"
Expand All @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions src/backend/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -298,6 +298,10 @@ impl ContextOps for PulseContext {
}
}

fn supported_input_processing_params(&mut self) -> Result<InputProcessingParams> {
Ok(InputProcessingParams::NONE)
}

fn enumerate_devices(
&mut self,
devtype: DeviceType,
Expand Down
12 changes: 10 additions & 2 deletions src/backend/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 8ff972c

Please sign in to comment.