revert(apu): switch from f32 44.1kHz to u16 32.768kHz

This commit is contained in:
2022-10-30 05:03:02 -03:00
parent 9a732ea6f8
commit 2ef4bb7dcc
2 changed files with 8 additions and 8 deletions

View File

@@ -105,8 +105,8 @@ pub fn runFrame(sched: *Scheduler, cpu: *Arm7tdmi) void {
}
fn audioSync(audio_sync: bool, stream: *SDL.SDL_AudioStream, is_buffer_full: *bool) void {
comptime std.debug.assert(@import("../platform.zig").sample_format == SDL.AUDIO_F32);
const sample_size = 2 * @sizeOf(f32);
comptime std.debug.assert(@import("../platform.zig").sample_format == SDL.AUDIO_U16);
const sample_size = 2 * @sizeOf(u16);
const max_buf_size: c_int = 0x400;
// Determine whether the APU is busy right at this moment