Skip to content

Commit

Permalink
Add debug printouts before running the manual test for mono and stereo
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed May 28, 2024
1 parent 37f6ab1 commit c7f9253
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/backend/tests/manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,26 @@ fn test_stream_tester() {
#[ignore]
#[test]
fn test_tone() {
let devices = test_get_devices_in_scope(Scope::Output);
for (idx, device) in devices.iter().enumerate() {
let info = TestDeviceInfo::new(*device, Scope::Output);
let mut pa = AudioObjectPropertyAddress::default();
pa.mSelector = kAudioDevicePropertyPreferredChannelsForStereo;
pa.mScope = kAudioDevicePropertyScopeOutput;
pa.mElement = kAudioObjectPropertyElementMaster;
get_serial_queue_singleton().run_sync(|| {
let mut ssize: usize = 8;
let mut value = [0 as u32; 2];
let r = audio_object_get_property_data(*device, &pa, &mut ssize, &mut value);
if r != 0 {
eprintln!("Error getting prop data");
}
println!(
"{}: Channels for the stereo pair are [{}, {}]",
info.label, value[0], value[1]
);
});
}
fn test_impl(ch_count: usize) {
use std::f32::consts::PI;
use std::thread;
Expand Down

0 comments on commit c7f9253

Please sign in to comment.