Skip to content

Commit ea542dd

Browse files
fix: WASAPI debug logging use Debug trait instead of tuple field access
SampleRate type field access (.0) fails on some cpal versions. Use {:?} Debug formatting which works across all versions.
1 parent 1cf512d commit ea542dd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

crates/opendrop-core/src/audio/capture.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,11 @@ fn run_audio_thread(
465465
if let Ok(configs) = device.supported_output_configs() {
466466
for (i, cfg) in configs.enumerate() {
467467
debug!(
468-
" Output config {}: channels={}, rate={}-{}, format={:?}",
468+
" Output config {}: channels={}, rate={:?}-{:?}, format={:?}",
469469
i,
470470
cfg.channels(),
471-
cfg.min_sample_rate().0,
472-
cfg.max_sample_rate().0,
471+
cfg.min_sample_rate(),
472+
cfg.max_sample_rate(),
473473
cfg.sample_format()
474474
);
475475
}
@@ -498,8 +498,8 @@ fn run_audio_thread(
498498
#[cfg(target_os = "windows")]
499499
if is_loopback {
500500
info!(
501-
"WASAPI loopback negotiated: {} Hz, {} ch, {:?}",
502-
supported_config.sample_rate().0,
501+
"WASAPI loopback negotiated: {:?} Hz, {} ch, {:?}",
502+
supported_config.sample_rate(),
503503
supported_config.channels(),
504504
supported_config.sample_format()
505505
);

0 commit comments

Comments
 (0)