We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60e46cf + 34eba41 commit 34e34f0Copy full SHA for 34e34f0
servers/audio/audio_stream.cpp
@@ -810,7 +810,11 @@ void AudioStreamPlaybackRandomizer::tag_used_streams() {
810
811
int AudioStreamPlaybackRandomizer::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
812
if (playing.is_valid()) {
813
- 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);
814
+ for (int samp = 0; samp < mixed_samples; samp++) {
815
+ p_buffer[samp] *= volume_scale;
816
+ }
817
+ return mixed_samples;
818
} else {
819
for (int i = 0; i < p_frames; i++) {
820
p_buffer[i] = AudioFrame(0, 0);
0 commit comments