summaryrefslogtreecommitdiff
path: root/servers/audio/effects/audio_effect_pitch_shift.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/audio/effects/audio_effect_pitch_shift.h')
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/servers/audio/effects/audio_effect_pitch_shift.h b/servers/audio/effects/audio_effect_pitch_shift.h
index febc20e9d5..0c80cb6344 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.h
+++ b/servers/audio/effects/audio_effect_pitch_shift.h
@@ -76,6 +76,7 @@ class AudioEffectPitchShiftInstance : public AudioEffectInstance {
friend class AudioEffectPitchShift;
Ref<AudioEffectPitchShift> base;
+ int fft_size;
SMBPitchShift shift_l;
SMBPitchShift shift_r;
@@ -85,11 +86,22 @@ public:
class AudioEffectPitchShift : public AudioEffect {
GDCLASS(AudioEffectPitchShift, AudioEffect)
+public:
+ enum FFT_Size {
+ FFT_SIZE_256,
+ FFT_SIZE_512,
+ FFT_SIZE_1024,
+ FFT_SIZE_2048,
+ FFT_SIZE_4096,
+ FFT_SIZE_MAX
+ };
+public:
friend class AudioEffectPitchShiftInstance;
float pitch_scale;
- int window_size;
+ int oversampling;
+ FFT_Size fft_size;
float wet;
float dry;
bool filter;
@@ -103,7 +115,15 @@ public:
void set_pitch_scale(float p_pitch_scale);
float get_pitch_scale() const;
+ void set_oversampling(int p_oversampling);
+ int get_oversampling() const;
+
+ void set_fft_size(FFT_Size);
+ FFT_Size get_fft_size() const;
+
AudioEffectPitchShift();
};
+VARIANT_ENUM_CAST(AudioEffectPitchShift::FFT_Size);
+
#endif // AUDIO_EFFECT_PITCH_SHIFT_H