Skip to content

Commit d1a7b12

Browse files
committed
revert stream.rs
1 parent 99ea187 commit d1a7b12

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/host/asio/stream.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl Device {
225225
}
226226

227227
(&sys::AsioSampleType::ASIOSTInt24LSB, SampleFormat::I24) => {
228-
process_input_callback_i24::<I24, _>(
228+
process_input_callback_i24(
229229
&mut data_callback,
230230
&mut interleaved,
231231
asio_stream,
@@ -235,7 +235,7 @@ impl Device {
235235
);
236236
}
237237
(&sys::AsioSampleType::ASIOSTInt24MSB, SampleFormat::I24) => {
238-
process_input_callback_i24::<I24, _>(
238+
process_input_callback_i24(
239239
&mut data_callback,
240240
&mut interleaved,
241241
asio_stream,
@@ -334,6 +334,7 @@ impl Device {
334334
/// 2. If required, silence the ASIO buffer.
335335
/// 3. Finally, write the interleaved data to the non-interleaved ASIO buffer,
336336
/// performing endianness conversions as necessary.
337+
#[allow(clippy::too_many_arguments)]
337338
unsafe fn process_output_callback<A, D, F>(
338339
data_callback: &mut D,
339340
interleaved: &mut [u8],
@@ -773,7 +774,7 @@ unsafe fn asio_channel_slice<T>(
773774
) -> &[T] {
774775
let channel_length = requested_channel_length.unwrap_or(asio_stream.buffer_size as usize);
775776
let buff_ptr: *const T =
776-
asio_stream.buffer_infos[channel_index].buffers[buffer_index as usize] as *const _;
777+
asio_stream.buffer_infos[channel_index].buffers[buffer_index] as *const _;
777778
std::slice::from_raw_parts(buff_ptr, channel_length)
778779
}
779780

@@ -788,8 +789,7 @@ unsafe fn asio_channel_slice_mut<T>(
788789
requested_channel_length: Option<usize>,
789790
) -> &mut [T] {
790791
let channel_length = requested_channel_length.unwrap_or(asio_stream.buffer_size as usize);
791-
let buff_ptr: *mut T =
792-
asio_stream.buffer_infos[channel_index].buffers[buffer_index as usize] as *mut _;
792+
let buff_ptr: *mut T = asio_stream.buffer_infos[channel_index].buffers[buffer_index] as *mut _;
793793
std::slice::from_raw_parts_mut(buff_ptr, channel_length)
794794
}
795795

@@ -890,15 +890,14 @@ unsafe fn process_output_callback_i24<D>(
890890
}
891891
}
892892

893-
unsafe fn process_input_callback_i24<A, D>(
893+
unsafe fn process_input_callback_i24<D>(
894894
data_callback: &mut D,
895895
interleaved: &mut [u8],
896896
asio_stream: &sys::AsioStream,
897897
asio_info: &sys::CallbackInfo,
898898
sample_rate: crate::SampleRate,
899899
little_endian: bool,
900900
) where
901-
A: Copy,
902901
D: FnMut(&Data, &InputCallbackInfo) + Send + 'static,
903902
{
904903
let format = SampleFormat::I24;

0 commit comments

Comments
 (0)