diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-16 10:50:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 10:50:10 +0100 |
commit | b196e6270959ebcb5fecd5cef58ea895f8cf2b80 (patch) | |
tree | 2ff9c99480fbab6051f180c16a8341d2165a8e39 | |
parent | 866cad9767222e70f802b24e930b606e8f0bef62 (diff) | |
parent | f993d2eeee6d87309dd1b1da6b6beee0e1661f4e (diff) |
Merge pull request #46083 from ellenhp/mono_ogg_fix
Fix mono->stereo conversion for oggs
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index f7bf650354..6732078efc 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -47,7 +47,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; } } |