feat(snd): simplify audio buffer
All checks were successful
continuous-integration/drone/push Build is passing

The audio buffer now is held by crossbeam. The developers of said
library could write a batter queue than I could anyday
This commit is contained in:
2021-07-11 23:48:16 -05:00
parent 3754325e30
commit b13444c885
3 changed files with 29 additions and 108 deletions

View File

@@ -125,13 +125,13 @@ impl Cpu {
}
};
let mut pending: u32 = cycles.into();
for _ in 0..pending {
if !self.bus.is_audio_full() {
let pending: u32 = cycles.into();
let mut offset = 0;
for _ in 0..(pending + offset) {
if !self.bus.is_mpsc_still_full() {
self.bus.clock();
} else {
self.bus.flush_audio();
pending += 1;
offset += 1;
}
}