Skip to content

Commit 588f65b

Browse files
committed
apply cargo fmt
1 parent 3d10392 commit 588f65b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/aaudio.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use crate::{AudioOutputDevice, BaseAudioOutputDevice, OutputDeviceParameters};
66
use ndk::audio::{
7-
AudioStream, AudioStreamBuilder, AudioCallbackResult, AudioDirection, AudioFormat, AudioPerformanceMode,
8-
AudioError,
7+
AudioCallbackResult, AudioDirection, AudioError, AudioFormat, AudioPerformanceMode,
8+
AudioStream, AudioStreamBuilder,
99
};
1010
use std::error::Error;
1111

@@ -39,21 +39,21 @@ impl AudioOutputDevice for AAudioOutputDevice {
3939
.performance_mode(AudioPerformanceMode::LowLatency)
4040
// Force the AAudio to give the buffer of fixed size.
4141
.frames_per_data_callback(frame_count)
42-
.data_callback(
43-
Box::new(move |_, data, num_frames| {
44-
let output_data = unsafe {
45-
std::slice::from_raw_parts_mut::<f32>(
46-
data as *mut f32,
47-
num_frames as usize * params.channels_count,
48-
)
49-
};
42+
.data_callback(Box::new(move |_, data, num_frames| {
43+
let output_data = unsafe {
44+
std::slice::from_raw_parts_mut::<f32>(
45+
data as *mut f32,
46+
num_frames as usize * params.channels_count,
47+
)
48+
};
5049

51-
data_callback(output_data);
50+
data_callback(output_data);
5251

53-
AudioCallbackResult::Continue
54-
})
55-
)
56-
.error_callback(Box::new(|_, error| eprintln!("AAudio: an error has occurred - {:?}", error)))
52+
AudioCallbackResult::Continue
53+
}))
54+
.error_callback(Box::new(|_, error| {
55+
eprintln!("AAudio: an error has occurred - {:?}", error)
56+
}))
5757
.open_stream()
5858
.map_err(convert_err)?;
5959

0 commit comments

Comments
 (0)