fix: play right samples in right channel

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-05-27 18:47:15 -03:00
parent 1170673447
commit c6ce810afe
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);