summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-13 13:50:34 +0200
committerGitHub <noreply@github.com>2019-05-13 13:50:34 +0200
commit0594db96a9c036c855cdb433275a90b169f0f712 (patch)
treeb9d97e55f3332ae14dd66d172b1ca658b52c4122 /servers
parent9beb26cef3915ef6fafe4c6ed36c7a58494bfa3a (diff)
parent9285aad8b359defaacbbcbf3796a530240c3876b (diff)
Merge pull request #28780 from bojidar-bg/x-audio-record-passthrough
Fix AudioEffectRecord messing up the effect stack by not writing to dst_frames
Diffstat (limited to 'servers')
-rw-r--r--servers/audio/effects/audio_effect_record.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp
index 96d5c9df89..abf9d5593c 100644
--- a/servers/audio/effects/audio_effect_record.cpp
+++ b/servers/audio/effects/audio_effect_record.cpp
@@ -32,6 +32,9 @@
void AudioEffectRecordInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
if (!is_recording) {
+ for (int i = 0; i < p_frame_count; i++) {
+ p_dst_frames[i] = p_src_frames[i];
+ }
return;
}
@@ -39,6 +42,7 @@ void AudioEffectRecordInstance::process(const AudioFrame *p_src_frames, AudioFra
const AudioFrame *src = p_src_frames;
AudioFrame *rb_buf = ring_buffer.ptrw();
for (int i = 0; i < p_frame_count; i++) {
+ p_dst_frames[i] = p_src_frames[i];
rb_buf[ring_buffer_pos & ring_buffer_mask] = src[i];
ring_buffer_pos++;
}