diff --git a/src/apu.zig b/src/apu.zig index bb36b10..4db97bc 100644 --- a/src/apu.zig +++ b/src/apu.zig @@ -203,7 +203,7 @@ pub const Apu = struct { self.stream = SDL.SDL_NewAudioStream(SDL.AUDIO_F32, 2, @intCast(c_int, self.sampleRate()), SDL.AUDIO_F32, 2, host_sample_rate) orelse unreachable; } - // while (SDL.SDL_AudioStreamAvailable(self.stream) > (@sizeOf(f32) * 2 * 0x800)) {} + while (SDL.SDL_AudioStreamAvailable(self.stream) > (@sizeOf(f32) * 2 * 0x800)) {} _ = SDL.SDL_AudioStreamPut(self.stream, &[2]f32{ left, right }, 2 * @sizeOf(f32)); self.sched.push(.SampleAudio, self.sched.now() + self.sampleTicks() - late); diff --git a/src/main.zig b/src/main.zig index a6883d3..ee3a515 100644 --- a/src/main.zig +++ b/src/main.zig @@ -102,7 +102,7 @@ pub fn main() anyerror!void { var emu_rate = FpsAverage.init(); // Create Emulator Thread - const emu_thread = try Thread.spawn(.{}, emu.run, .{ .LimitedFPS, &quit, &emu_rate, &scheduler, &cpu }); + const emu_thread = try Thread.spawn(.{}, emu.run, .{ .UnlimitedFPS, &quit, &emu_rate, &scheduler, &cpu }); defer emu_thread.join(); var title_buf: [0x20]u8 = std.mem.zeroes([0x20]u8);