Merge pull request #32198 from starryalley/fix_audio_buffer

Fix VideostreamGDNative audio buffer handling
This commit is contained in:
Rémi Verschelde 2019-09-23 15:01:43 +02:00 committed by GitHub
commit 30e16fff57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {