Browse Source

Minor fixes to the WIP example

pull/83/head
Andrea Ciliberti 2 years ago
parent
commit
554f96dcc4
  1. 4
      ctru-rs/examples/audio_filters.rs

4
ctru-rs/examples/audio_filters.rs

@ -17,10 +17,6 @@ const AUDIO_WAVE_LENGTH: u32 = SAMPLES_PER_BUF * BYTES_PER_SAMPLE * 2;
// Note Frequencies // Note Frequencies
const NOTEFREQ: [u32; 7] = [220, 440, 880, 1760, 3520, 7040, 14080]; const NOTEFREQ: [u32; 7] = [220, 440, 880, 1760, 3520, 7040, 14080];
fn array_size(array: &[u8]) -> usize {
array.len()
} // (sizeof(array)/sizeof(array[0]))
// audioBuffer is stereo PCM16 // audioBuffer is stereo PCM16
fn fill_buffer(audioData: &mut Box<[u8], LinearAllocator>, frequency: u32) { fn fill_buffer(audioData: &mut Box<[u8], LinearAllocator>, frequency: u32) {
for i in 0..audioData.len() { for i in 0..audioData.len() {

Loading…
Cancel
Save