diff options
author | Mark Kuo <starryalley@gmail.com> | 2019-09-19 15:28:33 +1000 |
---|---|---|
committer | Mark Kuo <starryalley@gmail.com> | 2019-09-19 15:28:33 +1000 |
commit | 8d2efe75ae8a18acc2da7bedb807a76afa83d8b7 (patch) | |
tree | 16ae7ef72da0cc8276d0f30c9d9c7f86d7261dc7 /modules/gdnative | |
parent | a1fcac640061c45e9dc55b1189e82aed3e2672fb (diff) |
Fix VideostreamGDNative audio buffer handling
Fix the audio buffer start when there are previous remains
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/videodecoder/video_stream_gdnative.cpp | 2 |
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 { |