From a87a5ce273ab133027b961d3b8444d206f549c1c Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:36 -0300 Subject: [PATCH] chore: calculate apu sample rate a bit better --- src/apu.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apu.zig b/src/apu.zig index 9b7f51d..f539b12 100644 --- a/src/apu.zig +++ b/src/apu.zig @@ -12,7 +12,7 @@ const intToBytes = @import("util.zig").intToBytes; const log = std.log.scoped(.APU); const sample_rate = 32768; -const sample_ticks = 280896 * 60 / sample_rate; +const sample_ticks = (1 << 24) / sample_rate; pub const Apu = struct { const Self = @This();