feat(snd): synchronize audio with rest of system

In it's current form I think this is actually rather inefficient. It's
also not very accurate since I throw away a lot of samples for no real
good reason. More improvements to thiss will be coming henceforth
This commit is contained in:
2021-07-11 23:22:17 -05:00
parent 45dc27301c
commit 3b772c7c49
3 changed files with 123 additions and 18 deletions

View File

@@ -70,6 +70,14 @@ impl Bus {
self.snd.set_audio_src(sender)
}
pub(crate) fn is_audio_full(&self) -> bool {
self.snd.is_audio_full()
}
pub(crate) fn flush_audio(&mut self) {
self.snd.flush_audio()
}
pub(crate) fn clock(&mut self) {
self.ppu.clock();
self.timer.clock();