FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Flanger Class Reference

The flanger effect creates a “tearing” or “whooshing” sound. More...

#include <soundeffect.h>

+ Inheritance diagram for FIFE::Flanger:
+ Collaboration diagram for FIFE::Flanger:

Public Member Functions

 Flanger ()
 Constructor. More...
 
void setWaveformTriangle (bool value)
 Sets waveform to triangle or sinus. More...
 
bool isWaveformTriangle () const
 Return if waveform is triangle or sinus. More...
 
void setPhase (int32_t value)
 Sets phase, difference between the left and right LFO’s. More...
 
int32_t getPhase () const
 Return phase. More...
 
void setRate (float value)
 Sets rate, the number of times per second the LFO controlling the amount of delay repeats. More...
 
float getRate () const
 Return rate. More...
 
void setDepth (float value)
 Sets depth, the ratio by which the delay time is modulated by the LFO. More...
 
float getDepth () const
 Return depth. More...
 
void setFeedback (float value)
 Sets feedback, the amount of the output signal level fed back into the effect’s input. More...
 
float getFeedback () const
 Return feedback. More...
 
void setDelay (float value)
 Sets delay, the average amount of time the sample is delayed before it is played back. More...
 
float getDelay () const
 Return delay. More...
 
- Public Member Functions inherited from FIFE::SoundEffect
 SoundEffect ()
 Constructor. More...
 
virtual ~SoundEffect ()
 Destructor. More...
 
ALuint getEffectId () const
 Return the OpenAL effect handle. More...
 
void setSlotId (ALuint slot)
 Sets the OpenAL auxiliary slot handle. More...
 
ALuint getSlotId ()
 Return the OpenAL auxiliary slot handle. More...
 
SoundEffectType getEffectType () const
 Return sound effect type. More...
 
void setEnabled (bool enabled)
 Enables or disables the effect. More...
 
bool isEnabled () const
 Return true if the effect is enabled, false otherwise. More...
 
void setFilter (SoundFilter *filter)
 Sets the additional sound filter. More...
 
SoundFiltergetFilter ()
 Return sound filter or NULL. More...
 

Private Attributes

bool m_waveformTriangle
 
int32_t m_phase
 
float m_rate
 
float m_depth
 
float m_feedback
 
float m_delay
 

Additional Inherited Members

- Protected Attributes inherited from FIFE::SoundEffect
ALuint m_effect
 Effect object id. More...
 
ALuint m_slot
 Effect slot id;. More...
 
SoundEffectType m_effectType
 Sound effect type. More...
 
bool m_enabled
 Effect enabled. More...
 
SoundFilterm_filter
 Additional filter effect. More...
 

Detailed Description

The flanger effect creates a “tearing” or “whooshing” sound.

Definition at line 456 of file soundeffect.h.

Constructor & Destructor Documentation

◆ Flanger()

FIFE::Flanger::Flanger ( )

Member Function Documentation

◆ getDelay()

float FIFE::Flanger::getDelay ( ) const

Return delay.

Definition at line 540 of file soundeffect.cpp.

References m_delay.

◆ getDepth()

float FIFE::Flanger::getDepth ( ) const

Return depth.

Definition at line 518 of file soundeffect.cpp.

References m_depth.

◆ getFeedback()

float FIFE::Flanger::getFeedback ( ) const

Return feedback.

Definition at line 529 of file soundeffect.cpp.

References m_feedback.

◆ getPhase()

int32_t FIFE::Flanger::getPhase ( ) const

Return phase.

Definition at line 496 of file soundeffect.cpp.

References m_phase.

◆ getRate()

float FIFE::Flanger::getRate ( ) const

Return rate.

Definition at line 507 of file soundeffect.cpp.

References m_rate.

◆ isWaveformTriangle()

bool FIFE::Flanger::isWaveformTriangle ( ) const

Return if waveform is triangle or sinus.

Definition at line 485 of file soundeffect.cpp.

References m_waveformTriangle.

◆ setDelay()

void FIFE::Flanger::setDelay ( float  value)

Sets delay, the average amount of time the sample is delayed before it is played back.

Parameters
valueRange 0.0 to 0.004, default 0.002.

Definition at line 533 of file soundeffect.cpp.

References FIFE::alEffectf, m_delay, and FIFE::SoundEffect::m_effect.

◆ setDepth()

void FIFE::Flanger::setDepth ( float  value)

Sets depth, the ratio by which the delay time is modulated by the LFO.

Parameters
valueRange 0.0 to 1.0, default 1.0.

Definition at line 511 of file soundeffect.cpp.

References FIFE::alEffectf, m_depth, and FIFE::SoundEffect::m_effect.

◆ setFeedback()

void FIFE::Flanger::setFeedback ( float  value)

Sets feedback, the amount of the output signal level fed back into the effect’s input.

Parameters
valueRange -1.0 to 1.0, default -0.5.

Definition at line 522 of file soundeffect.cpp.

References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_feedback.

◆ setPhase()

void FIFE::Flanger::setPhase ( int32_t  value)

Sets phase, difference between the left and right LFO’s.

At zero degrees the two LFOs are synchronized.

Parameters
valueRange -180 to 180, default 0.

Definition at line 489 of file soundeffect.cpp.

References FIFE::alEffecti, FIFE::SoundEffect::m_effect, and m_phase.

◆ setRate()

void FIFE::Flanger::setRate ( float  value)

Sets rate, the number of times per second the LFO controlling the amount of delay repeats.

Parameters
valueRange 0.0 to 10.0, default 0.27.

Definition at line 500 of file soundeffect.cpp.

References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_rate.

◆ setWaveformTriangle()

void FIFE::Flanger::setWaveformTriangle ( bool  value)

Sets waveform to triangle or sinus.

Controls the amount of the delay of the sampled signal.

Parameters
valueIf true triangle is used otherwise sinus, default is true.

Definition at line 476 of file soundeffect.cpp.

References FIFE::alEffecti, FIFE::SoundEffect::m_effect, and m_waveformTriangle.

Member Data Documentation

◆ m_delay

float FIFE::Flanger::m_delay
private

Definition at line 527 of file soundeffect.h.

Referenced by getDelay(), and setDelay().

◆ m_depth

float FIFE::Flanger::m_depth
private

Definition at line 525 of file soundeffect.h.

Referenced by getDepth(), and setDepth().

◆ m_feedback

float FIFE::Flanger::m_feedback
private

Definition at line 526 of file soundeffect.h.

Referenced by getFeedback(), and setFeedback().

◆ m_phase

int32_t FIFE::Flanger::m_phase
private

Definition at line 523 of file soundeffect.h.

Referenced by getPhase(), and setPhase().

◆ m_rate

float FIFE::Flanger::m_rate
private

Definition at line 524 of file soundeffect.h.

Referenced by getRate(), and setRate().

◆ m_waveformTriangle

bool FIFE::Flanger::m_waveformTriangle
private

Definition at line 522 of file soundeffect.h.

Referenced by isWaveformTriangle(), and setWaveformTriangle().


The documentation for this class was generated from the following files: