summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-23 15:01:43 +0200
committerGitHub <noreply@github.com>2019-09-23 15:01:43 +0200
commit30e16fff57cfdeb79f8e9ee6a7516e7d7cd6d376 (patch)
tree2288091c8d955ad044e1b57862edcfc4a71719a2 /modules/gdnative
parent06b07eebb5853d24c1aa2776554be5b4f16af147 (diff)
parent8d2efe75ae8a18acc2da7bedb807a76afa83d8b7 (diff)
Merge pull request #32198 from starryalley/fix_audio_buffer
Fix VideostreamGDNative audio buffer handling
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
index be131c5402..212ff51b80 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
@@ -149,7 +149,7 @@ void VideoStreamPlaybackGDNative::update(float p_delta) {
if (mix_callback) {
if (pcm_write_idx >= 0) {
// Previous remains
- int mixed = mix_callback(mix_udata, pcm, samples_decoded);
+ int mixed = mix_callback(mix_udata, pcm + pcm_write_idx * num_channels, samples_decoded);
if (mixed == samples_decoded) {
pcm_write_idx = -1;
} else {