From 56f54cb0b303dc3f8aa78d1b7df4aa3fb07508cd Mon Sep 17 00:00:00 2001 From: Pedro Tacla Yamada Date: Wed, 9 Nov 2022 22:26:06 +1100 Subject: [PATCH] Update to use coreaudio-sys 0.11 (#706) --- 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 26d1ec3..f8f22da 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 002b405..204ed68 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,