You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix VideostreamGDNative audio buffer handling
Fix the audio buffer start when there are previous remains
This commit is contained in:
@@ -149,7 +149,7 @@ void VideoStreamPlaybackGDNative::update(float p_delta) {
|
|||||||
if (mix_callback) {
|
if (mix_callback) {
|
||||||
if (pcm_write_idx >= 0) {
|
if (pcm_write_idx >= 0) {
|
||||||
// Previous remains
|
// 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) {
|
if (mixed == samples_decoded) {
|
||||||
pcm_write_idx = -1;
|
pcm_write_idx = -1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user