Browse Source

Example works fine, audio feels off

pull/83/head
Andrea Ciliberti 2 years ago
parent
commit
0f74b4be9f
  1. 15
      ctru-rs/examples/audio_filters.rs

15
ctru-rs/examples/audio_filters.rs

@ -149,22 +149,23 @@ fn main() { @@ -149,22 +149,23 @@ fn main() {
}
}
let current: Option<&mut WaveInfo>;
let current: &mut WaveInfo;
let other: &mut WaveInfo;
if altern {
current = Some(&mut wave_info1);
current = &mut wave_info1;
other = &mut wave_info2;
} else {
current = Some(&mut wave_info2);
current = &mut wave_info2;
other = &mut wave_info1;
}
let current = current.unwrap();
let status = current.get_status();
if let WaveStatus::Done = status {
altern = !altern;
fill_buffer(current.get_mut_wavebuffer().get_mut_data(), NOTEFREQ[note]);
channel_zero.queue_wave(current);
fill_buffer(other.get_mut_wavebuffer().get_mut_data(), NOTEFREQ[note]);
channel_zero.queue_wave(other);
}
// Flush and swap framebuffers

Loading…
Cancel
Save