Skip to content

Commit 278e12c

Browse files
committed
fix: WASAPI output callback to take &mut Data
Add missing cfg guards for ASIO and JACK in StreamConfigBuilder
1 parent fb0ea08 commit 278e12c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/host/wasapi/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ impl Device {
798798
sample_format: SampleFormat,
799799
data_callback: D,
800800
error_callback: E,
801-
timeout: Option<Duration>,
801+
_timeout: Option<Duration>,
802802
wasapi_config: Option<&super::WasapiStreamConfig>,
803803
) -> Result<Stream, BuildStreamError>
804804
where
@@ -825,7 +825,7 @@ impl Device {
825825
wasapi_config: Option<&super::WasapiStreamConfig>,
826826
) -> Result<Stream, BuildStreamError>
827827
where
828-
D: FnMut(&Data, &OutputCallbackInfo) + Send + 'static,
828+
D: FnMut(&mut Data, &OutputCallbackInfo) + Send + 'static,
829829
E: FnMut(StreamError) + Send + 'static,
830830
{
831831
let stream_inner =

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,7 @@ impl StreamConfigBuilder {
24362436
)
24372437
.map(crate::Stream::from);
24382438
}
2439+
#[cfg(any(feature = "asio", feature = "jack"))]
24392440
_ => {} // Not WASAPI device, continue to standard method
24402441
}
24412442
}
@@ -2541,6 +2542,7 @@ impl StreamConfigBuilder {
25412542
)
25422543
.map(crate::Stream::from);
25432544
}
2545+
#[cfg(any(feature = "asio", feature = "jack"))]
25442546
_ => {} // Not WASAPI device, continue to standard method
25452547
}
25462548
}

0 commit comments

Comments
 (0)