Class fx_gain¶
Defined in File dm_fx_gain.h
Inheritance Relationships¶
Base Type¶
public fx_effect
(Class fx_effect)
Class Documentation¶
-
class
fx_gain
: public fx_effect¶ Effect: Gain - used to increase or decrease the volume of an audio signal.
Public Functions
-
fx_gain
(float gain_val)¶ Basic constructor/initializer for gain.
- Parameters
[in] gain_val
: The gain value
-
fx_gain
(float gain_val, EFFECT_TRANSITION_SPEED gain_trans_speed)¶ Advanced constructor for the gain.
- Parameters
[in] gain_val
: The gain value (typically between 0.0->1.0 to make a signal quiter and > 1.0 to make a signal louder)[in] gain_trans_speed
: The gain transaction speed based onEFFECT_TRANSITION_SPEED
defined above (i.e. slow -> fast)
-
void
enable
()¶ Enable the this_effect (it is enabled by default)
-
void
bypass
()¶ Bypass the this_effect (will just pass clean audio through)
-
void
set_gain
(float new_gain)¶ Sets the gain multiplier. For example, a value of 2 will double the volume/amplitude and a value of 0.5 will halve the volume/amplitude.
- Parameters
[in] new_gain
: The new gain value (0.0 -> 4.0)
-
void
set_gain_db
(float new_gain_db)¶ Sets the gain multiplier using decibles. For example, a value of 0 will keep volume the same, a value of 6 will double the amplitude/volume, a value of -6 will halve the amplitude/volume.
- Parameters
[in] new_gain_db
: The new gain value (dB)
-
void
print_params
(void)¶ Prints the parameters for the delay effect.
-