Skip to content

Commit 562008e

Browse files
committed
mad: fix stereo audio playback
1 parent 93e0025 commit 562008e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/mad/synth.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,10 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
707707

708708
*pcm1 = scale(SHIFT(-MLZ(hi, lo)));
709709
pcm1 += 16;
710-
711-
phase = (phase + 1) % 16;
712710
}
713711

712+
phase = (phase + 1) % 16;
713+
714714
/* render block */
715715
render_sample_block(synth->pcm.samples[0], synth->pcm.samples[1], synth->pcm.samplerate, nch, 32);
716716
}
@@ -850,10 +850,10 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
850850

851851
*pcm1 = scale(SHIFT(-MLZ(hi, lo)));
852852
pcm1 += 8;
853-
854-
phase = (phase + 1) % 16;
855853
}
856854

855+
phase = (phase + 1) % 16;
856+
857857
/* render block */
858858
render_sample_block(synth->pcm.samples[0], synth->pcm.samples[1], synth->pcm.samplerate, nch, 16);
859859
}

0 commit comments

Comments
 (0)