fix: play right samples in right channel

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:12:46 -03:00
parent fc7f2a2959
commit 2502cc5bf0
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ pub const Apu = struct {
right += bias; right += bias;
const tmp_left = std.math.clamp(@intCast(u16, left), std.math.minInt(u11), std.math.maxInt(u11)); const tmp_left = std.math.clamp(@intCast(u16, left), std.math.minInt(u11), std.math.maxInt(u11));
const tmp_right = std.math.clamp(@intCast(u16, left), std.math.minInt(u11), std.math.maxInt(u11)); const tmp_right = std.math.clamp(@intCast(u16, right), std.math.minInt(u11), std.math.maxInt(u11));
// Extend to 16-bit signed audio samples // Extend to 16-bit signed audio samples
const final_left = (tmp_left << 5) | (tmp_left >> 6); const final_left = (tmp_left << 5) | (tmp_left >> 6);