Skip to content

Commit f7bb2c8

Browse files
committed
Copy audio data to dest when bypassing pitch effect
1 parent 701505e commit f7bb2c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

servers/audio/effects/audio_effect_pitch_shift.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ void SMBPitchShift::smbFft(float *fftBuffer, long fftFrameSize, long sign)
288288
void AudioEffectPitchShiftInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
289289
// Avoid distortion by skipping processing if pitch_scale is 1.0.
290290
if (Math::is_equal_approx(base->pitch_scale, 1.0f)) {
291+
for (int i = 0; i < p_frame_count; i++) {
292+
p_dst_frames[i] = p_src_frames[i];
293+
}
291294
return;
292295
}
293296

0 commit comments

Comments
 (0)