Fix mono->stereo conversion for oggs (see #40630)

(cherry picked from commit f993d2eeee)
This commit is contained in:
Ellen Poe 2021-02-15 20:42:45 -08:00 committed by Rémi Verschelde
parent c67c3e0a46
commit fc0419d84a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, buffer, todo * 2);
if (vorbis_stream->channels == 1 && mixed > 0) {
//mix mono to stereo
for (int i = start_buffer; i < mixed; i++) {
for (int i = start_buffer; i < start_buffer + mixed; i++) {
p_buffer[i].r = p_buffer[i].l;
}
}