Repository: godotengine/godot (language: cpp)

Issue:
AudioEffectPitchShift cancels out other AudioEffects
### Tested versions

Issue is found in Godot 4.4
Tested in Godot 4.3 and bug cannot be reproduced









### System information

Godot v4.4.stable - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA; 32.0.15.6636) - AMD Ryzen 7 7435HS (16 threads)

### Issue description

Playing an audio file from AudioStreamPlayer2D. 

when using pitch shift effect in any bus channel, if any other effects are added then pitch shift cancels out the other effects. If they are on the same bus then there is no audio. If effects are separate i.e pitch shift on master bus and other effects on other buses then audio is heard but other effects are cancelled out and their "effect" is not heard.




### Steps to reproduce

Playing an audio file from AudioStreamPlayer2D. 

Using AudioEffectPitchShift on the master bus - works ok
Add another effect to the master bus - no audio when play()
Uncheck AudioEffectPitchShift in master bus - audio ok when play()

Create bus channel, route AudioStreamPlayer2D to new bus,
move other effect to new master bus, 
AudioEffectPitchShift remains in master bus - audio is now heard but other effects are cancelled out by AudioEffectPitchShift
Uncheck AudioEffectPitchShift in master bus - new bus effects work again

### Minimal reproduction project (MRP)

[EffectBug.zip](https://github.com/user-attachments/files/19212952/EffectBug.zip)
AudioEffectPitchShift cancels out other AudioEffects
### Tested versions

Issue is found in Godot 4.4
Tested in Godot 4.3 and bug cannot be reproduced









### System information

Godot v4.4.stable - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA; 32.0.15.6636) - AMD Ryzen 7 7435HS (16 threads)

### Issue description

Playing an audio file from AudioStreamPlayer2D. 

when using pitch shift effect in any bus channel, if any other effects are added then pitch shift cancels out the other effects. If they are on the same bus then there is no audio. If effects are separate i.e pitch shift on master bus and other effects on other buses then audio is heard but other effects are cancelled out and their "effect" is not heard.




### Steps to reproduce

Playing an audio file from AudioStreamPlayer2D. 

Using AudioEffectPitchShift on the master bus - works ok
Add another effect to the master bus - no audio when play()
Uncheck AudioEffectPitchShift in master bus - audio ok when play()

Create bus channel, route AudioStreamPlayer2D to new bus,
move other effect to new master bus, 
AudioEffectPitchShift remains in master bus - audio is now heard but other effects are cancelled out by AudioEffectPitchShift
Uncheck AudioEffectPitchShift in master bus - new bus effects work again

### Minimal reproduction project (MRP)

[EffectBug.zip](https://github.com/user-attachments/files/19212952/EffectBug.zip)


Discussion / hints:

Fix patch:
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 89273d744b8a..1fba20983c03 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -288,6 +288,9 @@ void SMBPitchShift::smbFft(float *fftBuffer, long fftFrameSize, long sign)
 void AudioEffectPitchShiftInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
 	// Avoid distortion by skipping processing if pitch_scale is 1.0.
 	if (Math::is_equal_approx(base->pitch_scale, 1.0f)) {
+		for (int i = 0; i < p_frame_count; i++) {
+			p_dst_frames[i] = p_src_frames[i];
+		}
 		return;
 	}
 


Test patch: