From 2a9a770d4c9c9bf2ab5a377644948fa8dde8ddc5 Mon Sep 17 00:00:00 2001 From: yamadapc Date: Sat, 8 Oct 2022 17:19:16 +1100 Subject: [PATCH] Update to use coreaudio-sys 0.11 --- Cargo.toml | 4 ++-- src/host/coreaudio/macos/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 26d1ec397..f8f22dae0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,10 +44,10 @@ mach = "0.3" # For access to mach_timebase type. parking_lot = "0.12" [target.'cfg(target_os = "macos")'.dependencies] -coreaudio-rs = { version = "0.10", default-features = false, features = ["audio_unit", "core_audio"] } +coreaudio-rs = { version = "0.11", default-features = false, features = ["audio_unit", "core_audio"] } [target.'cfg(target_os = "ios")'.dependencies] -coreaudio-rs = { version = "0.10", default-features = false, features = ["audio_unit", "core_audio", "audio_toolbox"] } +coreaudio-rs = { version = "0.11", default-features = false, features = ["audio_unit", "core_audio", "audio_toolbox"] } [target.'cfg(target_os = "emscripten")'.dependencies] wasm-bindgen = { version = "0.2.58" } diff --git a/src/host/coreaudio/macos/mod.rs b/src/host/coreaudio/macos/mod.rs index 002b4051b..204ed68ba 100644 --- a/src/host/coreaudio/macos/mod.rs +++ b/src/host/coreaudio/macos/mod.rs @@ -388,9 +388,9 @@ impl Device { _ => return Err(DefaultStreamConfigError::StreamTypeNotSupported), }; let maybe_sample_format = - coreaudio::audio_unit::SampleFormat::from_flags_and_bytes_per_frame( + coreaudio::audio_unit::SampleFormat::from_flags_and_bits_per_sample( flags, - asbd.mBytesPerFrame, + asbd.mBitsPerChannel, ); match maybe_sample_format { Some(coreaudio::audio_unit::SampleFormat::F32) => SampleFormat::F32,