FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::FrequencyShifter Class Reference

The frequency shifter is a single-sideband modulator, which translates all the component frequencies of the input signal by an equal amount. More...

#include <soundeffect.h>

+ Inheritance diagram for FIFE::FrequencyShifter:
+ Collaboration diagram for FIFE::FrequencyShifter:

Public Member Functions

 FrequencyShifter ()
 Constructor. More...
 
void setFrequency (float value)
 Sets the carrier frequency. More...
 
float getFrequency () const
 Return carrier frequency. More...
 
void setLeftDirection (uint8_t value)
 Sets left direction, selects which internal signals are added together to produce the output. More...
 
uint8_t getLeftDirection () const
 Return left direction. More...
 
void setRightDirection (uint8_t value)
 Sets right direction, selects which internal signals are added together to produce the output. More...
 
uint8_t getRightDirection () const
 Return left direction. 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

float m_frequency
 
uint8_t m_leftDirection
 
uint8_t m_rightDirection
 

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 frequency shifter is a single-sideband modulator, which translates all the component frequencies of the input signal by an equal amount.

Definition at line 533 of file soundeffect.h.

Constructor & Destructor Documentation

FIFE::FrequencyShifter::FrequencyShifter ( )

Member Function Documentation

float FIFE::FrequencyShifter::getFrequency ( ) const

Return carrier frequency.

Definition at line 560 of file soundeffect.cpp.

References m_frequency.

uint8_t FIFE::FrequencyShifter::getLeftDirection ( ) const

Return left direction.

Definition at line 571 of file soundeffect.cpp.

References m_leftDirection.

uint8_t FIFE::FrequencyShifter::getRightDirection ( ) const

Return left direction.

Definition at line 582 of file soundeffect.cpp.

References m_rightDirection.

void FIFE::FrequencyShifter::setFrequency ( float  value)

Sets the carrier frequency.

For carrier frequencies below the audible range, the single-sideband modulator may produce phaser, spatial effects.

Parameters
valueRange 0.0 to 24000.0, default 0.0.

Definition at line 553 of file soundeffect.cpp.

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

void FIFE::FrequencyShifter::setLeftDirection ( uint8_t  value)

Sets left direction, selects which internal signals are added together to produce the output.

Parameters
valueRange 0 to 2. 0=down, 1=up, 2=off, default 0.

Definition at line 564 of file soundeffect.cpp.

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

void FIFE::FrequencyShifter::setRightDirection ( uint8_t  value)

Sets right direction, selects which internal signals are added together to produce the output.

Parameters
valueRange 0 to 2. 0=down, 1=up, 2=off, default 0.

Definition at line 575 of file soundeffect.cpp.

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

Member Data Documentation

float FIFE::FrequencyShifter::m_frequency
private

Definition at line 570 of file soundeffect.h.

Referenced by getFrequency(), and setFrequency().

uint8_t FIFE::FrequencyShifter::m_leftDirection
private

Definition at line 571 of file soundeffect.h.

Referenced by getLeftDirection(), and setLeftDirection().

uint8_t FIFE::FrequencyShifter::m_rightDirection
private

Definition at line 572 of file soundeffect.h.

Referenced by getRightDirection(), and setRightDirection().


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