diff --git a/src/backend/device_property.rs b/src/backend/device_property.rs index e6e33561..964bec88 100644 --- a/src/backend/device_property.rs +++ b/src/backend/device_property.rs @@ -266,28 +266,6 @@ pub fn get_device_stream_configuration( let len = list.mNumberBuffers as usize; let mut buffers = unsafe { slice::from_raw_parts(ptr, len) }; - cubeb_log!( - "get_device_stream_configuration id={}; type={}; tap {}; running={}; num_buffers={}, buffers={:?}", - id, - match devtype { - DeviceType::INPUT => "INPUT", - DeviceType::OUTPUT => "OUTPUT", - _ => "UNKNOWN", - }, - match get_device_tap_enabled(id) { - Ok(true) => "enabled", - Ok(false) => "not enabled", - _ => "ERRORED", - }, - match get_device_is_running(id) { - Ok(true) => "true", - Ok(false) => "false", - _ => "ERRORED", - }, - len, - buffers - ); - const ISPK: u32 = 0x6973_706B; // "ispk" (internal speaker) if devtype == DeviceType::INPUT && get_device_tap_enabled(id).unwrap_or(false) @@ -316,20 +294,6 @@ pub fn get_device_tap_enabled(id: AudioDeviceID) -> std::result::Result std::result::Result { - let address = get_property_address( - Property::DeviceIsRunning, - DeviceType::INPUT | DeviceType::OUTPUT, - ); - let mut running: u32 = 0; - let mut size = mem::size_of::(); - let err = audio_object_get_property_data(id, &address, &mut size, &mut running); - if err != NO_ERR { - return Err(err); - } - Ok(running != 0) -} - pub fn get_stream_latency( id: AudioStreamID, devtype: DeviceType, diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 027075ac..45edf5ce 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -1362,6 +1362,25 @@ fn get_channel_count( let buffers = get_device_stream_configuration(devid, devtype)?; let mut count = 0; + println!( + "dev {} {} {} TAP {:?} SOURCE stream_configuration={:?}", + devid, + match devtype { + DeviceType::INPUT => "input", + DeviceType::OUTPUT => "output", + _ => "type-unknown", + }, + match get_device_tap_enabled(devid) { + Ok(true) => "YEA", + Ok(false) => "NAY", + _ => "UNKNOWN", + }, + match get_device_source(devid, DeviceType::OUTPUT) { + Ok(tt) => convert_uint32_into_string(tt), + _ => CString::default(), + }, + buffers + ); for buffer in buffers { count += buffer.mNumberChannels; }