summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-16 10:50:10 +0100
committerGitHub <noreply@github.com>2021-02-16 10:50:10 +0100
commitb196e6270959ebcb5fecd5cef58ea895f8cf2b80 (patch)
tree2ff9c99480fbab6051f180c16a8341d2165a8e39 /modules
parent866cad9767222e70f802b24e930b606e8f0bef62 (diff)
parentf993d2eeee6d87309dd1b1da6b6beee0e1661f4e (diff)
Merge pull request #46083 from ellenhp/mono_ogg_fix
Fix mono->stereo conversion for oggs
Diffstat (limited to 'modules')
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp2
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;
}
}