diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 455a8b49a17f..65d88a0eba97 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -810,7 +810,11 @@ void AudioStreamPlaybackRandomizer::tag_used_streams() { int AudioStreamPlaybackRandomizer::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) { if (playing.is_valid()) { - return playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames); + int mixed_samples = playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames); + for (int samp = 0; samp < mixed_samples; samp++) { + p_buffer[samp] *= volume_scale; + } + return mixed_samples; } else { for (int i = 0; i < p_frames; i++) { p_buffer[i] = AudioFrame(0, 0);