Browse Source

fmt

pull/83/head
Andrea Ciliberti 2 years ago
parent
commit
429e60c878
  1. 6
      ctru-rs/examples/audio_filters.rs
  2. 6
      ctru-rs/src/services/ndsp/wave.rs

6
ctru-rs/examples/audio_filters.rs

@ -84,8 +84,10 @@ fn main() { @@ -84,8 +84,10 @@ fn main() {
fill_buffer(&mut audio_data1[..], NOTEFREQ[4]);
let mut audio_data2 = audio_data1.clone();
let mut audio_buffer1 = WaveBuffer::new(audio_data1, AudioFormat::PCM16Stereo).expect("Couldn't sync DSP cache");
let mut audio_buffer2 = WaveBuffer::new(audio_data2, AudioFormat::PCM16Stereo).expect("Couldn't sync DSP cache");
let mut audio_buffer1 =
WaveBuffer::new(audio_data1, AudioFormat::PCM16Stereo).expect("Couldn't sync DSP cache");
let mut audio_buffer2 =
WaveBuffer::new(audio_data2, AudioFormat::PCM16Stereo).expect("Couldn't sync DSP cache");
let mut wave_info1 = WaveInfo::new(&mut audio_buffer1, false);
let mut wave_info2 = WaveInfo::new(&mut audio_buffer2, false);

6
ctru-rs/src/services/ndsp/wave.rs

@ -93,7 +93,11 @@ impl<'b> WaveInfo<'b> { @@ -93,7 +93,11 @@ impl<'b> WaveInfo<'b> {
next: std::ptr::null_mut(),
};
Self { buffer, raw_data, played_on_channel: None,}
Self {
buffer,
raw_data,
played_on_channel: None,
}
}
pub fn get_mut_wavebuffer(&mut self) -> &mut WaveBuffer {

Loading…
Cancel
Save