mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
WAV: Fix one frame overflow at the end
(cherry picked from commit 147accdf74)
This commit is contained in:
committed by
Rémi Verschelde
parent
4addddd8df
commit
51c86eb085
@@ -300,7 +300,7 @@ int AudioStreamPlaybackWAV::mix(AudioFrame *p_buffer, float p_rate_scale, int p_
|
||||
int64_t loop_end_fp = ((int64_t)base->loop_end << MIX_FRAC_BITS);
|
||||
int64_t length_fp = ((int64_t)len << MIX_FRAC_BITS);
|
||||
int64_t begin_limit = (base->loop_mode != AudioStreamWAV::LOOP_DISABLED) ? loop_begin_fp : 0;
|
||||
int64_t end_limit = (base->loop_mode != AudioStreamWAV::LOOP_DISABLED) ? loop_end_fp : length_fp;
|
||||
int64_t end_limit = (base->loop_mode != AudioStreamWAV::LOOP_DISABLED) ? loop_end_fp : length_fp - MIX_FRAC_LEN;
|
||||
bool is_stereo = base->stereo;
|
||||
|
||||
int32_t todo = p_frames;
|
||||
|
||||
Reference in New Issue
Block a user