Fix process_callback function signatures in asio backend

This commit is contained in:
mitchmindtree 2020-04-16 15:23:17 +02:00
parent 3f69770471
commit aae44cf3d6
1 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ impl Device {
) where ) where
A: AsioSample, A: AsioSample,
B: Sample, B: Sample,
D: FnMut(&Data) + Send + 'static, D: FnMut(&Data, &InputCallbackInfo) + Send + 'static,
F: Fn(A) -> A, F: Fn(A) -> A,
{ {
// 1. Write the ASIO channels to the CPAL buffer. // 1. Write the ASIO channels to the CPAL buffer.
@ -303,7 +303,7 @@ impl Device {
) where ) where
A: Sample, A: Sample,
B: AsioSample, B: AsioSample,
D: FnMut(&mut Data) + Send + 'static, D: FnMut(&mut Data, &OutputCallbackInfo) + Send + 'static,
F: Fn(B) -> B, F: Fn(B) -> B,
{ {
// 1. Render interleaved buffer from callback. // 1. Render interleaved buffer from callback.
@ -312,7 +312,7 @@ impl Device {
let len = interleaved.len(); let len = interleaved.len();
let mut data = Data::from_parts(data, len, A::FORMAT); let mut data = Data::from_parts(data, len, A::FORMAT);
let info = OutputCallbackInfo {}; let info = OutputCallbackInfo {};
callback(&mut data); callback(&mut data, &info);
// 2. Silence ASIO channels if necessary. // 2. Silence ASIO channels if necessary.
let n_channels = interleaved.len() / asio_stream.buffer_size as usize; let n_channels = interleaved.len() / asio_stream.buffer_size as usize;