I've noticed a device's default number of input channels isn't correctly reported when querying StreamFormat. The number of output channels on the other hand is correctly reported.
You can reproduce this behaviour by running:
use coreaudio::audio_unit::macos_helpers::{audio_unit_from_device_id, get_device_id_from_name};
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
let device = &args[1];
let au_in = audio_unit_from_device_id(get_device_id_from_name(device).unwrap(), true).unwrap();
let au_out =
audio_unit_from_device_id(get_device_id_from_name(device).unwrap(), false).unwrap();
println!(
"{} Input {:?}",
device,
au_in.input_stream_format().unwrap()
);
println!(
"{} Output {:?}",
device,
au_out.output_stream_format().unwrap()
);
}
Looks like the issue is between the keyboard and chair, input_stream_format returns the current format, rather than the supported format(s). Will close as no longer relevant.
Hi,
I've noticed a device's default number of input channels isn't correctly reported when querying
StreamFormat
. The number of output channels on the other hand is correctly reported.You can reproduce this behaviour by running:
Running with
UMC1820
(10 in, 12 out) returns:I'm not sure whether this is an issue with the library or CoreAudio itself, so any help with this would be appreciated!