summaryrefslogtreecommitdiff
path: root/servers/audio/effects
diff options
context:
space:
mode:
Diffstat (limited to 'servers/audio/effects')
-rw-r--r--servers/audio/effects/audio_effect_amplify.cpp4
-rw-r--r--servers/audio/effects/audio_effect_amplify.h2
-rw-r--r--servers/audio/effects/audio_effect_capture.cpp4
-rw-r--r--servers/audio/effects/audio_effect_capture.h4
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp6
-rw-r--r--servers/audio/effects/audio_effect_chorus.h2
-rw-r--r--servers/audio/effects/audio_effect_compressor.cpp4
-rw-r--r--servers/audio/effects/audio_effect_compressor.h2
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp4
-rw-r--r--servers/audio/effects/audio_effect_delay.h2
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp6
-rw-r--r--servers/audio/effects/audio_effect_distortion.h2
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp4
-rw-r--r--servers/audio/effects/audio_effect_eq.h2
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp4
-rw-r--r--servers/audio/effects/audio_effect_filter.h8
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp4
-rw-r--r--servers/audio/effects/audio_effect_limiter.h2
-rw-r--r--servers/audio/effects/audio_effect_panner.cpp4
-rw-r--r--servers/audio/effects/audio_effect_panner.h2
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp4
-rw-r--r--servers/audio/effects/audio_effect_phaser.h2
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp8
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.h12
-rw-r--r--servers/audio/effects/audio_effect_record.cpp6
-rw-r--r--servers/audio/effects/audio_effect_record.h4
-rw-r--r--servers/audio/effects/audio_effect_reverb.cpp4
-rw-r--r--servers/audio/effects/audio_effect_reverb.h2
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp8
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.h12
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.cpp4
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.h2
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp2
-rw-r--r--servers/audio/effects/reverb.cpp2
34 files changed, 72 insertions, 72 deletions
diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp
index c5c1174670..79788d334b 100644
--- a/servers/audio/effects/audio_effect_amplify.cpp
+++ b/servers/audio/effects/audio_effect_amplify.cpp
@@ -44,9 +44,9 @@ void AudioEffectAmplifyInstance::process(const AudioFrame *p_src_frames, AudioFr
mix_volume_db = volume_db;
}
-Ref<AudioEffectInstance> AudioEffectAmplify::instance() {
+Ref<AudioEffectInstance> AudioEffectAmplify::instantiate() {
Ref<AudioEffectAmplifyInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectAmplify>(this);
ins->mix_volume_db = volume_db;
return ins;
diff --git a/servers/audio/effects/audio_effect_amplify.h b/servers/audio/effects/audio_effect_amplify.h
index 2ece57854c..9d3facc230 100644
--- a/servers/audio/effects/audio_effect_amplify.h
+++ b/servers/audio/effects/audio_effect_amplify.h
@@ -56,7 +56,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_volume_db(float p_volume);
float get_volume_db() const;
diff --git a/servers/audio/effects/audio_effect_capture.cpp b/servers/audio/effects/audio_effect_capture.cpp
index 78837c7531..065065042e 100644
--- a/servers/audio/effects/audio_effect_capture.cpp
+++ b/servers/audio/effects/audio_effect_capture.cpp
@@ -73,7 +73,7 @@ void AudioEffectCapture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
}
-Ref<AudioEffectInstance> AudioEffectCapture::instance() {
+Ref<AudioEffectInstance> AudioEffectCapture::instantiate() {
if (!buffer_initialized) {
float target_buffer_size = AudioServer::get_singleton()->get_mix_rate() * buffer_length_seconds;
ERR_FAIL_COND_V(target_buffer_size <= 0 || target_buffer_size >= (1 << 27), Ref<AudioEffectInstance>());
@@ -84,7 +84,7 @@ Ref<AudioEffectInstance> AudioEffectCapture::instance() {
clear_buffer();
Ref<AudioEffectCaptureInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectCapture>(this);
return ins;
diff --git a/servers/audio/effects/audio_effect_capture.h b/servers/audio/effects/audio_effect_capture.h
index 81d4ed6b0f..7f50fc4965 100644
--- a/servers/audio/effects/audio_effect_capture.h
+++ b/servers/audio/effects/audio_effect_capture.h
@@ -33,7 +33,7 @@
#include "core/config/engine.h"
#include "core/math/audio_frame.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "core/templates/vector.h"
#include "servers/audio/audio_effect.h"
#include "servers/audio_server.h"
@@ -64,7 +64,7 @@ protected:
static void _bind_methods();
public:
- virtual Ref<AudioEffectInstance> instance() override;
+ virtual Ref<AudioEffectInstance> instantiate() override;
void set_buffer_length(float p_buffer_length_seconds);
float get_buffer_length();
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index eb2268aa2e..9af3ed30cc 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -141,9 +141,9 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames, A
buffer_pos += p_frame_count;
}
-Ref<AudioEffectInstance> AudioEffectChorus::instance() {
+Ref<AudioEffectInstance> AudioEffectChorus::instantiate() {
Ref<AudioEffectChorusInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectChorus>(this);
for (int i = 0; i < 4; i++) {
ins->filter_h[i] = AudioFrame(0, 0);
@@ -276,7 +276,7 @@ void AudioEffectChorus::_validate_property(PropertyInfo &property) const {
if (property.name.begins_with("voice/")) {
int voice_idx = property.name.get_slice("/", 1).to_int();
if (voice_idx > voice_count) {
- property.usage = 0;
+ property.usage = PROPERTY_USAGE_NONE;
}
}
}
diff --git a/servers/audio/effects/audio_effect_chorus.h b/servers/audio/effects/audio_effect_chorus.h
index f5b023734a..f81bebb0ae 100644
--- a/servers/audio/effects/audio_effect_chorus.h
+++ b/servers/audio/effects/audio_effect_chorus.h
@@ -128,7 +128,7 @@ public:
void set_dry(float amount);
float get_dry() const;
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
AudioEffectChorus();
};
diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp
index bb4a90f3d6..cfa2ae6f79 100644
--- a/servers/audio/effects/audio_effect_compressor.cpp
+++ b/servers/audio/effects/audio_effect_compressor.cpp
@@ -112,9 +112,9 @@ void AudioEffectCompressorInstance::process(const AudioFrame *p_src_frames, Audi
}
}
-Ref<AudioEffectInstance> AudioEffectCompressor::instance() {
+Ref<AudioEffectInstance> AudioEffectCompressor::instantiate() {
Ref<AudioEffectCompressorInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectCompressor>(this);
ins->rundb = 0;
ins->runratio = 0;
diff --git a/servers/audio/effects/audio_effect_compressor.h b/servers/audio/effects/audio_effect_compressor.h
index 33c60680fc..dae4618a64 100644
--- a/servers/audio/effects/audio_effect_compressor.h
+++ b/servers/audio/effects/audio_effect_compressor.h
@@ -65,7 +65,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_threshold(float p_threshold);
float get_threshold() const;
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index ba50eeb0a3..07475e1ed4 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -111,9 +111,9 @@ void AudioEffectDelayInstance::_process_chunk(const AudioFrame *p_src_frames, Au
}
}
-Ref<AudioEffectInstance> AudioEffectDelay::instance() {
+Ref<AudioEffectInstance> AudioEffectDelay::instantiate() {
Ref<AudioEffectDelayInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectDelay>(this);
float ring_buffer_max_size = MAX_DELAY_MS + 100; //add 100ms of extra room, just in case
diff --git a/servers/audio/effects/audio_effect_delay.h b/servers/audio/effects/audio_effect_delay.h
index ff267d5023..50a2233e5f 100644
--- a/servers/audio/effects/audio_effect_delay.h
+++ b/servers/audio/effects/audio_effect_delay.h
@@ -126,7 +126,7 @@ public:
void set_feedback_lowpass(float p_lowpass);
float get_feedback_lowpass() const;
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
AudioEffectDelay();
};
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 06d51776a3..188b7a3301 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -93,9 +93,9 @@ void AudioEffectDistortionInstance::process(const AudioFrame *p_src_frames, Audi
}
}
-Ref<AudioEffectInstance> AudioEffectDistortion::instance() {
+Ref<AudioEffectInstance> AudioEffectDistortion::instantiate() {
Ref<AudioEffectDistortionInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectDistortion>(this);
ins->h[0] = 0;
ins->h[1] = 0;
@@ -159,7 +159,7 @@ void AudioEffectDistortion::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_post_gain", "post_gain"), &AudioEffectDistortion::set_post_gain);
ClassDB::bind_method(D_METHOD("get_post_gain"), &AudioEffectDistortion::get_post_gain);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Clip,ATan,LoFi,Overdrive,WaveShape"), "set_mode", "get_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Clip,ATan,LoFi,Overdrive,Wave Shape"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
diff --git a/servers/audio/effects/audio_effect_distortion.h b/servers/audio/effects/audio_effect_distortion.h
index 9da800b79f..3a762f8cf6 100644
--- a/servers/audio/effects/audio_effect_distortion.h
+++ b/servers/audio/effects/audio_effect_distortion.h
@@ -68,7 +68,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_mode(Mode p_mode);
Mode get_mode() const;
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index 01ac605bd7..e87944b74b 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -59,9 +59,9 @@ void AudioEffectEQInstance::process(const AudioFrame *p_src_frames, AudioFrame *
}
}
-Ref<AudioEffectInstance> AudioEffectEQ::instance() {
+Ref<AudioEffectInstance> AudioEffectEQ::instantiate() {
Ref<AudioEffectEQInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectEQ>(this);
ins->gains.resize(eq.get_band_count());
for (int i = 0; i < 2; i++) {
diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h
index 38c63a7d4f..b99727d7c0 100644
--- a/servers/audio/effects/audio_effect_eq.h
+++ b/servers/audio/effects/audio_effect_eq.h
@@ -66,7 +66,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_band_gain_db(int p_band, float p_volume);
float get_band_gain_db(int p_band) const;
int get_band_count() const;
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index c2d6074825..1db8b1f1b5 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -100,9 +100,9 @@ AudioEffectFilterInstance::AudioEffectFilterInstance() {
}
}
-Ref<AudioEffectInstance> AudioEffectFilter::instance() {
+Ref<AudioEffectInstance> AudioEffectFilter::instantiate() {
Ref<AudioEffectFilterInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectFilter>(this);
return ins;
diff --git a/servers/audio/effects/audio_effect_filter.h b/servers/audio/effects/audio_effect_filter.h
index 9a48ccf70b..1fa3df1570 100644
--- a/servers/audio/effects/audio_effect_filter.h
+++ b/servers/audio/effects/audio_effect_filter.h
@@ -88,7 +88,7 @@ public:
void set_db(FilterDB p_db);
FilterDB get_db() const;
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
AudioEffectFilter(AudioFilterSW::Mode p_mode = AudioFilterSW::LOWPASS);
};
@@ -100,7 +100,7 @@ class AudioEffectLowPassFilter : public AudioEffectFilter {
void _validate_property(PropertyInfo &property) const override {
if (property.name == "gain") {
- property.usage = 0;
+ property.usage = PROPERTY_USAGE_NONE;
}
}
@@ -113,7 +113,7 @@ class AudioEffectHighPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter);
void _validate_property(PropertyInfo &property) const override {
if (property.name == "gain") {
- property.usage = 0;
+ property.usage = PROPERTY_USAGE_NONE;
}
}
@@ -126,7 +126,7 @@ class AudioEffectBandPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter);
void _validate_property(PropertyInfo &property) const override {
if (property.name == "gain") {
- property.usage = 0;
+ property.usage = PROPERTY_USAGE_NONE;
}
}
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index 1a4b01d947..280411641b 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -67,9 +67,9 @@ void AudioEffectLimiterInstance::process(const AudioFrame *p_src_frames, AudioFr
}
}
-Ref<AudioEffectInstance> AudioEffectLimiter::instance() {
+Ref<AudioEffectInstance> AudioEffectLimiter::instantiate() {
Ref<AudioEffectLimiterInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectLimiter>(this);
return ins;
diff --git a/servers/audio/effects/audio_effect_limiter.h b/servers/audio/effects/audio_effect_limiter.h
index 8f3092c0e2..d5def670a4 100644
--- a/servers/audio/effects/audio_effect_limiter.h
+++ b/servers/audio/effects/audio_effect_limiter.h
@@ -71,7 +71,7 @@ public:
void set_soft_clip_ratio(float p_soft_clip);
float get_soft_clip_ratio() const;
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_volume_db(float p_volume);
float get_volume_db() const;
diff --git a/servers/audio/effects/audio_effect_panner.cpp b/servers/audio/effects/audio_effect_panner.cpp
index 238e979e13..e2062609b9 100644
--- a/servers/audio/effects/audio_effect_panner.cpp
+++ b/servers/audio/effects/audio_effect_panner.cpp
@@ -40,9 +40,9 @@ void AudioEffectPannerInstance::process(const AudioFrame *p_src_frames, AudioFra
}
}
-Ref<AudioEffectInstance> AudioEffectPanner::instance() {
+Ref<AudioEffectInstance> AudioEffectPanner::instantiate() {
Ref<AudioEffectPannerInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectPanner>(this);
return ins;
}
diff --git a/servers/audio/effects/audio_effect_panner.h b/servers/audio/effects/audio_effect_panner.h
index 0938824c64..d75bcaeb95 100644
--- a/servers/audio/effects/audio_effect_panner.h
+++ b/servers/audio/effects/audio_effect_panner.h
@@ -54,7 +54,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_pan(float p_cpanume);
float get_pan() const;
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index 9b70f03a19..c76692eed7 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -78,9 +78,9 @@ void AudioEffectPhaserInstance::process(const AudioFrame *p_src_frames, AudioFra
}
}
-Ref<AudioEffectInstance> AudioEffectPhaser::instance() {
+Ref<AudioEffectInstance> AudioEffectPhaser::instantiate() {
Ref<AudioEffectPhaserInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectPhaser>(this);
ins->phase = 0;
ins->h = AudioFrame(0, 0);
diff --git a/servers/audio/effects/audio_effect_phaser.h b/servers/audio/effects/audio_effect_phaser.h
index 563927c678..2a0ed64805 100644
--- a/servers/audio/effects/audio_effect_phaser.h
+++ b/servers/audio/effects/audio_effect_phaser.h
@@ -83,7 +83,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_range_min_hz(float p_hz);
float get_range_min_hz() const;
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 2123fe8548..bfbaeee3f3 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -298,9 +298,9 @@ void AudioEffectPitchShiftInstance::process(const AudioFrame *p_src_frames, Audi
shift_r.PitchShift(base->pitch_scale, p_frame_count, fft_size, base->oversampling, sample_rate, in_r, out_r, 2);
}
-Ref<AudioEffectInstance> AudioEffectPitchShift::instance() {
+Ref<AudioEffectInstance> AudioEffectPitchShift::instantiate() {
Ref<AudioEffectPitchShiftInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectPitchShift>(this);
static const int fft_sizes[FFT_SIZE_MAX] = { 256, 512, 1024, 2048, 4096 };
ins->fft_size = fft_sizes[fft_size];
@@ -326,12 +326,12 @@ int AudioEffectPitchShift::get_oversampling() const {
return oversampling;
}
-void AudioEffectPitchShift::set_fft_size(FFT_Size p_fft_size) {
+void AudioEffectPitchShift::set_fft_size(FFTSize p_fft_size) {
ERR_FAIL_INDEX(p_fft_size, FFT_SIZE_MAX);
fft_size = p_fft_size;
}
-AudioEffectPitchShift::FFT_Size AudioEffectPitchShift::get_fft_size() const {
+AudioEffectPitchShift::FFTSize AudioEffectPitchShift::get_fft_size() const {
return fft_size;
}
diff --git a/servers/audio/effects/audio_effect_pitch_shift.h b/servers/audio/effects/audio_effect_pitch_shift.h
index 18a9c33968..3ed096cd94 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.h
+++ b/servers/audio/effects/audio_effect_pitch_shift.h
@@ -89,7 +89,7 @@ class AudioEffectPitchShift : public AudioEffect {
public:
friend class AudioEffectPitchShiftInstance;
- enum FFT_Size {
+ enum FFTSize {
FFT_SIZE_256,
FFT_SIZE_512,
FFT_SIZE_1024,
@@ -100,7 +100,7 @@ public:
float pitch_scale;
int oversampling;
- FFT_Size fft_size;
+ FFTSize fft_size;
float wet;
float dry;
bool filter;
@@ -109,7 +109,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_pitch_scale(float p_pitch_scale);
float get_pitch_scale() const;
@@ -117,12 +117,12 @@ public:
void set_oversampling(int p_oversampling);
int get_oversampling() const;
- void set_fft_size(FFT_Size);
- FFT_Size get_fft_size() const;
+ void set_fft_size(FFTSize);
+ FFTSize get_fft_size() const;
AudioEffectPitchShift();
};
-VARIANT_ENUM_CAST(AudioEffectPitchShift::FFT_Size);
+VARIANT_ENUM_CAST(AudioEffectPitchShift::FFTSize);
#endif // AUDIO_EFFECT_PITCH_SHIFT_H
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp
index 2015ede81f..f71679d30f 100644
--- a/servers/audio/effects/audio_effect_record.cpp
+++ b/servers/audio/effects/audio_effect_record.cpp
@@ -134,9 +134,9 @@ AudioEffectRecordInstance::~AudioEffectRecordInstance() {
finish();
}
-Ref<AudioEffectInstance> AudioEffectRecord::instance() {
+Ref<AudioEffectInstance> AudioEffectRecord::instantiate() {
Ref<AudioEffectRecordInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectRecord>(this);
ins->is_recording = false;
@@ -269,7 +269,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
}
Ref<AudioStreamSample> sample;
- sample.instance();
+ sample.instantiate();
sample->set_data(dst_data);
sample->set_format(dst_format);
sample->set_mix_rate(AudioServer::get_singleton()->get_mix_rate());
diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h
index b97ec43946..1a89821f80 100644
--- a/servers/audio/effects/audio_effect_record.h
+++ b/servers/audio/effects/audio_effect_record.h
@@ -31,8 +31,8 @@
#ifndef AUDIOEFFECTRECORD_H
#define AUDIOEFFECTRECORD_H
+#include "core/io/file_access.h"
#include "core/io/marshalls.h"
-#include "core/os/file_access.h"
#include "core/os/os.h"
#include "core/os/thread.h"
#include "editor/import/resource_importer_wav.h"
@@ -96,7 +96,7 @@ protected:
static void debug(uint64_t time_diff, int p_frame_count);
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_recording_active(bool p_record);
bool is_recording_active() const;
void set_format(AudioStreamSample::Format p_format);
diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp
index b8d812680e..819f906773 100644
--- a/servers/audio/effects/audio_effect_reverb.cpp
+++ b/servers/audio/effects/audio_effect_reverb.cpp
@@ -79,9 +79,9 @@ AudioEffectReverbInstance::AudioEffectReverbInstance() {
reverb[1].set_extra_spread_base(0.000521); //for stereo effect
}
-Ref<AudioEffectInstance> AudioEffectReverb::instance() {
+Ref<AudioEffectInstance> AudioEffectReverb::instantiate() {
Ref<AudioEffectReverbInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectReverb>(this);
return ins;
}
diff --git a/servers/audio/effects/audio_effect_reverb.h b/servers/audio/effects/audio_effect_reverb.h
index 141ba48e29..d01d1120bd 100644
--- a/servers/audio/effects/audio_effect_reverb.h
+++ b/servers/audio/effects/audio_effect_reverb.h
@@ -89,7 +89,7 @@ public:
float get_wet() const;
float get_hpf() const;
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_volume_db(float p_volume);
float get_volume_db() const;
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index 3f7ab74a74..6f9e7ac67d 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -207,9 +207,9 @@ Vector2 AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range(f
}
}
-Ref<AudioEffectInstance> AudioEffectSpectrumAnalyzer::instance() {
+Ref<AudioEffectInstance> AudioEffectSpectrumAnalyzer::instantiate() {
Ref<AudioEffectSpectrumAnalyzerInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectSpectrumAnalyzer>(this);
static const int fft_sizes[FFT_SIZE_MAX] = { 256, 512, 1024, 2048, 4096 };
ins->fft_size = fft_sizes[fft_size];
@@ -245,12 +245,12 @@ float AudioEffectSpectrumAnalyzer::get_tap_back_pos() const {
return tapback_pos;
}
-void AudioEffectSpectrumAnalyzer::set_fft_size(FFT_Size p_fft_size) {
+void AudioEffectSpectrumAnalyzer::set_fft_size(FFTSize p_fft_size) {
ERR_FAIL_INDEX(p_fft_size, FFT_SIZE_MAX);
fft_size = p_fft_size;
}
-AudioEffectSpectrumAnalyzer::FFT_Size AudioEffectSpectrumAnalyzer::get_fft_size() const {
+AudioEffectSpectrumAnalyzer::FFTSize AudioEffectSpectrumAnalyzer::get_fft_size() const {
return fft_size;
}
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.h b/servers/audio/effects/audio_effect_spectrum_analyzer.h
index fba276e2bb..3c5ae4a5e8 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.h
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.h
@@ -71,7 +71,7 @@ class AudioEffectSpectrumAnalyzer : public AudioEffect {
GDCLASS(AudioEffectSpectrumAnalyzer, AudioEffect);
public:
- enum FFT_Size {
+ enum FFTSize {
FFT_SIZE_256,
FFT_SIZE_512,
FFT_SIZE_1024,
@@ -84,24 +84,24 @@ public:
friend class AudioEffectSpectrumAnalyzerInstance;
float buffer_length;
float tapback_pos;
- FFT_Size fft_size;
+ FFTSize fft_size;
protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_buffer_length(float p_seconds);
float get_buffer_length() const;
void set_tap_back_pos(float p_seconds);
float get_tap_back_pos() const;
- void set_fft_size(FFT_Size);
- FFT_Size get_fft_size() const;
+ void set_fft_size(FFTSize);
+ FFTSize get_fft_size() const;
AudioEffectSpectrumAnalyzer();
};
-VARIANT_ENUM_CAST(AudioEffectSpectrumAnalyzer::FFT_Size);
+VARIANT_ENUM_CAST(AudioEffectSpectrumAnalyzer::FFTSize);
#endif // AUDIO_EFFECT_SPECTRUM_ANALYZER_H
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp
index dfdf154aa4..3a016b06b8 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.cpp
+++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp
@@ -74,9 +74,9 @@ AudioEffectStereoEnhanceInstance::~AudioEffectStereoEnhanceInstance() {
memdelete_arr(delay_ringbuff);
}
-Ref<AudioEffectInstance> AudioEffectStereoEnhance::instance() {
+Ref<AudioEffectInstance> AudioEffectStereoEnhance::instantiate() {
Ref<AudioEffectStereoEnhanceInstance> ins;
- ins.instance();
+ ins.instantiate();
ins->base = Ref<AudioEffectStereoEnhance>(this);
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.h b/servers/audio/effects/audio_effect_stereo_enhance.h
index f99256470b..e0f9d79a94 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.h
+++ b/servers/audio/effects/audio_effect_stereo_enhance.h
@@ -68,7 +68,7 @@ protected:
static void _bind_methods();
public:
- Ref<AudioEffectInstance> instance() override;
+ Ref<AudioEffectInstance> instantiate() override;
void set_pan_pullout(float p_amount);
float get_pan_pullout() const;
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index d1a05ccf2a..bced2997ce 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -48,7 +48,7 @@ float AudioStreamGenerator::get_buffer_length() const {
Ref<AudioStreamPlayback> AudioStreamGenerator::instance_playback() {
Ref<AudioStreamGeneratorPlayback> playback;
- playback.instance();
+ playback.instantiate();
playback->generator = this;
int target_buffer_size = mix_rate * buffer_len;
playback->buffer.resize(nearest_shift(target_buffer_size));
diff --git a/servers/audio/effects/reverb.cpp b/servers/audio/effects/reverb.cpp
index 7df2f99f67..1d97de5205 100644
--- a/servers/audio/effects/reverb.cpp
+++ b/servers/audio/effects/reverb.cpp
@@ -290,7 +290,7 @@ void Reverb::update_parameters() {
c.feedback = (room_offset + room_scale);
}
- float auxdmp = params.damp / 2.0 + 0.5; //only half the range (0.5 .. 1.0 is enough)
+ float auxdmp = params.damp / 2.0 + 0.5; //only half the range (0.5 .. 1.0 is enough)
auxdmp *= auxdmp;
c.damp = expf(-Math_TAU * auxdmp * 10000 / params.mix_rate); // 0 .. 10khz