This commit is contained in:
2025-10-01 13:36:25 -06:00
parent d8a5ab465e
commit 4c63f77c24
3 changed files with 139 additions and 39 deletions

View File

@@ -41,9 +41,17 @@ pub fn main() {
wav.restart().unwrap()
}
wav.read(&mut buf).unwrap();
let read = wav.read(&mut buf).unwrap();
send_audio_buffer(&buf);
}
let event = get_key();
if event.state != KeyState::Idle {
match event.key {
KeyCode::Esc => return,
_ => (),
}
}
}
}
@@ -64,6 +72,7 @@ impl File {
impl PlatformFile for File {
fn read(&mut self, buf: &mut [u8]) -> Result<usize, PlatformFileError> {
let read = read_file(&self.file, self.current_pos, buf);
self.current_pos += read;
Ok(read)
}