Skip to content

Commit

Permalink
Corrected some points discussed in #17491
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Nov 16, 2018
1 parent 40e4f5b commit 256bbd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/classes/AudioEffectReverb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping">
Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code].
Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code].
</member>
<member name="dry" type="float" setter="set_dry" getter="get_dry">
Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code].
Expand All @@ -33,7 +33,7 @@
Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: [code]0.8[/code].
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread">
Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code].
Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code].
</member>
<member name="wet" type="float" setter="set_wet" getter="get_wet">
Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: [code]0.5[/code].
Expand Down
13 changes: 13 additions & 0 deletions servers/audio/effects/audio_effect_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,33 @@ VARIANT_ENUM_CAST(AudioEffectFilter::FilterDB)

class AudioEffectLowPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectLowPassFilter, AudioEffectFilter)

void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
}

public:
AudioEffectLowPassFilter() :
AudioEffectFilter(AudioFilterSW::LOWPASS) {}
};

class AudioEffectHighPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter)
void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
}

public:
AudioEffectHighPassFilter() :
AudioEffectFilter(AudioFilterSW::HIGHPASS) {}
};

class AudioEffectBandPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter)
void _validate_property(PropertyInfo &property) const {
if (property.name == "gain") property.usage = 0;
}

public:
AudioEffectBandPassFilter() :
AudioEffectFilter(AudioFilterSW::BANDPASS) {}
Expand Down

0 comments on commit 256bbd3

Please sign in to comment.