97 for (std::vector<SoundFilter*>::iterator it =
m_filters.begin(); it !=
m_filters.end(); ++it) {
100 for (std::vector<SoundEffect*>::iterator it =
m_effects.begin(); it !=
m_effects.end(); ++it) {
108 if (alcIsExtensionPresent(
m_device,
"ALC_EXT_EFX") == AL_FALSE) {
114 alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)alGetProcAddress(
"alGenAuxiliaryEffectSlots");
115 alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)alGetProcAddress(
"alDeleteAuxiliaryEffectSlots");
116 alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)alGetProcAddress(
"alIsAuxiliaryEffectSlot");
117 alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)alGetProcAddress(
"alAuxiliaryEffectSloti");
118 alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)alGetProcAddress(
"alAuxiliaryEffectSlotiv");
119 alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)alGetProcAddress(
"alAuxiliaryEffectSlotf");
120 alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)alGetProcAddress(
"alAuxiliaryEffectSlotfv");
121 alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)alGetProcAddress(
"alGetAuxiliaryEffectSloti");
122 alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)alGetProcAddress(
"alGetAuxiliaryEffectSlotiv");
123 alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)alGetProcAddress(
"alGetAuxiliaryEffectSlotf");
124 alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)alGetProcAddress(
"alGetAuxiliaryEffectSlotfv");
125 if (!(alGenAuxiliaryEffectSlots && alDeleteAuxiliaryEffectSlots && alIsAuxiliaryEffectSlot &&
126 alAuxiliaryEffectSloti && alAuxiliaryEffectSlotiv && alAuxiliaryEffectSlotf &&
127 alAuxiliaryEffectSlotfv && alGetAuxiliaryEffectSloti && alGetAuxiliaryEffectSlotiv &&
128 alGetAuxiliaryEffectSlotf && alGetAuxiliaryEffectSlotfv)) {
129 FL_WARN(
_log,
LMsg() <<
"Failed initializing slot function pointers\n");
134 alGenEffects = (LPALGENEFFECTS)alGetProcAddress(
"alGenEffects");
135 alDeleteEffects = (LPALDELETEEFFECTS)alGetProcAddress(
"alDeleteEffects");
136 alIsEffect = (LPALISEFFECT)alGetProcAddress(
"alIsEffect");
137 alEffecti = (LPALEFFECTI)alGetProcAddress(
"alEffecti");
138 alEffectiv = (LPALEFFECTIV)alGetProcAddress(
"alEffectiv");
139 alEffectf = (LPALEFFECTF)alGetProcAddress(
"alEffectf");
140 alEffectfv = (LPALEFFECTFV)alGetProcAddress(
"alEffectfv");
141 alGetEffecti = (LPALGETEFFECTI)alGetProcAddress(
"alGetEffecti");
142 alGetEffectiv = (LPALGETEFFECTIV)alGetProcAddress(
"alGetEffectiv");
143 alGetEffectf = (LPALGETEFFECTF)alGetProcAddress(
"alGetEffectf");
144 alGetEffectfv = (LPALGETEFFECTFV)alGetProcAddress(
"alGetEffectfv");
145 if (!(alGenEffects && alDeleteEffects && alIsEffect && alEffecti && alEffectiv && alEffectf &&
146 alEffectfv && alGetEffecti && alGetEffectiv && alGetEffectf && alGetEffectfv)) {
147 FL_WARN(
_log,
LMsg() <<
"Failed initializing effect function pointers\n");
152 alGenFilters = (LPALGENFILTERS)alGetProcAddress(
"alGenFilters");
153 alDeleteFilters = (LPALDELETEFILTERS)alGetProcAddress(
"alDeleteFilters");
154 alIsFilter = (LPALISFILTER)alGetProcAddress(
"alIsFilter");
155 alFilteri = (LPALFILTERI)alGetProcAddress(
"alFilteri");
156 alFilteriv = (LPALFILTERIV)alGetProcAddress(
"alFilteriv");
157 alFilterf = (LPALFILTERF)alGetProcAddress(
"alFilterf");
158 alFilterfv = (LPALFILTERFV)alGetProcAddress(
"alFilterfv");
159 alGetFilteri = (LPALGETFILTERI)alGetProcAddress(
"alGetFilteri");
160 alGetFilteriv = (LPALGETFILTERIV)alGetProcAddress(
"alGetFilteriv");
161 alGetFilterf = (LPALGETFILTERF)alGetProcAddress(
"alGetFilterf");
162 alGetFilterfv = (LPALGETFILTERFV)alGetProcAddress(
"alGetFilterfv");
163 if (!(alGenFilters && alDeleteFilters && alIsFilter && alFilteri && alFilteriv && alFilterf &&
164 alFilterfv && alGetFilteri && alGetFilteriv && alGetFilterf && alGetFilterfv)) {
165 FL_WARN(
_log,
LMsg() <<
"Failed initializing filter function pointers\n");
174 if (alGetError() != AL_NO_ERROR) {
227 std::map<SoundEffectPreset, EFXEAXREVERBPROPERTIES>::iterator it =
m_presets.find(type);
244 for (std::vector<SoundEffect*>::iterator it =
m_effects.begin(); it !=
m_effects.end(); ++it) {
248 std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin();
249 for (; emitterIt != effectIt->second.end(); ++emitterIt) {
250 (*emitterIt)->removeEffect(effect);
277 std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin();
278 for (; emitterIt != effectIt->second.end(); ++emitterIt) {
279 if (!(*emitterIt)->isActive()) {
297 std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin();
298 for (; emitterIt != effectIt->second.end(); ++emitterIt) {
307 FL_WARN(
_log,
LMsg() <<
"Maximal effect number for SoundEmitter reached");
320 FL_WARN(
_log,
LMsg() <<
"SoundEmitter can not removed from unknown effect");
324 std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin();
325 std::vector<SoundEmitter*>::iterator emitterEnd = effectIt->second.end();
326 while (emitterIt != emitterEnd) {
327 if ((*emitterIt) == emitter) {
332 effectIt->second.erase(emitterIt++);
339 FL_WARN(
_log,
LMsg() <<
"SoundEmitter could not be found for the given effect.");
360 FL_WARN(
_log,
LMsg() <<
"SoundEffect can not removed from unknown filter");
364 std::vector<SoundEffect*>::iterator effectIt = filterIt->second.begin();
365 std::vector<SoundEffect*>::iterator effectEnd = filterIt->second.end();
366 while (effectIt != effectEnd) {
367 if ((*effectIt) == effect) {
373 filterIt->second.erase(effectIt++);
381 FL_WARN(
_log,
LMsg() <<
"SoundEffect could not be found for the given filter.");
392 alSource3i(emitter->
getSource(), AL_AUXILIARY_SEND_FILTER, effect->
getSlotId(), number, filter);
400 alSource3i(emitter->
getSource(), AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, number, AL_FILTER_NULL);
411 for (std::vector<SoundFilter*>::iterator it =
m_filters.begin(); it !=
m_filters.end(); ++it) {
415 std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin();
416 for (; emitterIt != filterIt->second.end(); ++emitterIt) {
417 (*emitterIt)->setDirectFilter(NULL);
423 std::vector<SoundEffect*>::iterator effectIt = filterItt->second.begin();
424 for (; effectIt != filterItt->second.end(); ++effectIt) {
425 (*effectIt)->setFilter(NULL);
426 if ((*effectIt)->isEnabled()) {
447 std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin();
448 for (; emitterIt != filterIt->second.end(); ++emitterIt) {
449 if ((*emitterIt)->isActive()) {
462 std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin();
463 for (; emitterIt != filterIt->second.end(); ++emitterIt) {
464 if ((*emitterIt)->isActive()) {
487 FL_WARN(
_log,
LMsg() <<
"SoundEmitter can not removed from unknown filter");
491 std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin();
492 std::vector<SoundEmitter*>::iterator emitterEnd = filterIt->second.end();
493 while (emitterIt != emitterEnd) {
494 if ((*emitterIt) == emitter) {
499 filterIt->second.erase(emitterIt++);
507 FL_WARN(
_log,
LMsg() <<
"SoundEmitter could not be found for the given filter.");
520 alSourcei(emitter->
getSource(), AL_DIRECT_FILTER, AL_FILTER_NULL);
525 EFXEAXREVERBPROPERTIES prop1 = EFX_REVERB_PRESET_GENERIC;
526 EFXEAXREVERBPROPERTIES prop2 = EFX_REVERB_PRESET_PADDEDCELL;
527 EFXEAXREVERBPROPERTIES prop3 = EFX_REVERB_PRESET_ROOM;
528 EFXEAXREVERBPROPERTIES prop4 = EFX_REVERB_PRESET_BATHROOM;
529 EFXEAXREVERBPROPERTIES prop5 = EFX_REVERB_PRESET_LIVINGROOM;
530 EFXEAXREVERBPROPERTIES prop6 = EFX_REVERB_PRESET_STONEROOM;
531 EFXEAXREVERBPROPERTIES prop7 = EFX_REVERB_PRESET_AUDITORIUM;
532 EFXEAXREVERBPROPERTIES prop8 = EFX_REVERB_PRESET_CONCERTHALL;
533 EFXEAXREVERBPROPERTIES prop9 = EFX_REVERB_PRESET_CAVE;
534 EFXEAXREVERBPROPERTIES prop10 = EFX_REVERB_PRESET_ARENA;
535 EFXEAXREVERBPROPERTIES prop11 = EFX_REVERB_PRESET_HANGAR;
536 EFXEAXREVERBPROPERTIES prop12 = EFX_REVERB_PRESET_CARPETEDHALLWAY;
537 EFXEAXREVERBPROPERTIES prop13 = EFX_REVERB_PRESET_HALLWAY;
538 EFXEAXREVERBPROPERTIES prop14 = EFX_REVERB_PRESET_STONECORRIDOR;
539 EFXEAXREVERBPROPERTIES prop15 = EFX_REVERB_PRESET_ALLEY;
540 EFXEAXREVERBPROPERTIES prop16 = EFX_REVERB_PRESET_FOREST;
541 EFXEAXREVERBPROPERTIES prop17 = EFX_REVERB_PRESET_CITY;
542 EFXEAXREVERBPROPERTIES prop18 = EFX_REVERB_PRESET_MOUNTAINS;
543 EFXEAXREVERBPROPERTIES prop19 = EFX_REVERB_PRESET_QUARRY;
544 EFXEAXREVERBPROPERTIES prop20 = EFX_REVERB_PRESET_PLAIN;
545 EFXEAXREVERBPROPERTIES prop21 = EFX_REVERB_PRESET_PARKINGLOT;
546 EFXEAXREVERBPROPERTIES prop22 = EFX_REVERB_PRESET_SEWERPIPE;
547 EFXEAXREVERBPROPERTIES prop23 = EFX_REVERB_PRESET_UNDERWATER;
548 EFXEAXREVERBPROPERTIES prop24 = EFX_REVERB_PRESET_DRUGGED;
549 EFXEAXREVERBPROPERTIES prop25 = EFX_REVERB_PRESET_DIZZY;
550 EFXEAXREVERBPROPERTIES prop26 = EFX_REVERB_PRESET_PSYCHOTIC;
551 EFXEAXREVERBPROPERTIES prop27 = EFX_REVERB_PRESET_CASTLE_SMALLROOM;
552 EFXEAXREVERBPROPERTIES prop28 = EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE;
553 EFXEAXREVERBPROPERTIES prop29 = EFX_REVERB_PRESET_CASTLE_MEDIUMROOM;
554 EFXEAXREVERBPROPERTIES prop30 = EFX_REVERB_PRESET_CASTLE_LARGEROOM;
555 EFXEAXREVERBPROPERTIES prop31 = EFX_REVERB_PRESET_CASTLE_LONGPASSAGE;
556 EFXEAXREVERBPROPERTIES prop32 = EFX_REVERB_PRESET_CASTLE_HALL;
557 EFXEAXREVERBPROPERTIES prop33 = EFX_REVERB_PRESET_CASTLE_CUPBOARD;
558 EFXEAXREVERBPROPERTIES prop34 = EFX_REVERB_PRESET_CASTLE_COURTYARD;
559 EFXEAXREVERBPROPERTIES prop35 = EFX_REVERB_PRESET_CASTLE_ALCOVE;
560 EFXEAXREVERBPROPERTIES prop36 = EFX_REVERB_PRESET_FACTORY_SMALLROOM;
561 EFXEAXREVERBPROPERTIES prop37 = EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE;
562 EFXEAXREVERBPROPERTIES prop38 = EFX_REVERB_PRESET_FACTORY_MEDIUMROOM;
563 EFXEAXREVERBPROPERTIES prop39 = EFX_REVERB_PRESET_FACTORY_LARGEROOM;
564 EFXEAXREVERBPROPERTIES prop40 = EFX_REVERB_PRESET_FACTORY_LONGPASSAGE;
565 EFXEAXREVERBPROPERTIES prop41 = EFX_REVERB_PRESET_FACTORY_HALL;
566 EFXEAXREVERBPROPERTIES prop42 = EFX_REVERB_PRESET_FACTORY_CUPBOARD;
567 EFXEAXREVERBPROPERTIES prop43 = EFX_REVERB_PRESET_FACTORY_COURTYARD;
568 EFXEAXREVERBPROPERTIES prop44 = EFX_REVERB_PRESET_FACTORY_ALCOVE;
569 EFXEAXREVERBPROPERTIES prop45 = EFX_REVERB_PRESET_ICEPALACE_SMALLROOM;
570 EFXEAXREVERBPROPERTIES prop46 = EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE;
571 EFXEAXREVERBPROPERTIES prop47 = EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM;
572 EFXEAXREVERBPROPERTIES prop48 = EFX_REVERB_PRESET_ICEPALACE_LARGEROOM;
573 EFXEAXREVERBPROPERTIES prop49 = EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE;
574 EFXEAXREVERBPROPERTIES prop50 = EFX_REVERB_PRESET_ICEPALACE_HALL;
575 EFXEAXREVERBPROPERTIES prop51 = EFX_REVERB_PRESET_ICEPALACE_CUPBOARD;
576 EFXEAXREVERBPROPERTIES prop52 = EFX_REVERB_PRESET_ICEPALACE_COURTYARD;
577 EFXEAXREVERBPROPERTIES prop53 = EFX_REVERB_PRESET_ICEPALACE_ALCOVE;
578 EFXEAXREVERBPROPERTIES prop54 = EFX_REVERB_PRESET_SPACESTATION_SMALLROOM;
579 EFXEAXREVERBPROPERTIES prop55 = EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE;
580 EFXEAXREVERBPROPERTIES prop56 = EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM;
581 EFXEAXREVERBPROPERTIES prop57 = EFX_REVERB_PRESET_SPACESTATION_LARGEROOM;
582 EFXEAXREVERBPROPERTIES prop58 = EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE;
583 EFXEAXREVERBPROPERTIES prop59 = EFX_REVERB_PRESET_SPACESTATION_HALL;
584 EFXEAXREVERBPROPERTIES prop60 = EFX_REVERB_PRESET_SPACESTATION_CUPBOARD;
585 EFXEAXREVERBPROPERTIES prop61 = EFX_REVERB_PRESET_SPACESTATION_ALCOVE;
586 EFXEAXREVERBPROPERTIES prop62 = EFX_REVERB_PRESET_WOODEN_SMALLROOM;
587 EFXEAXREVERBPROPERTIES prop63 = EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE;
588 EFXEAXREVERBPROPERTIES prop64 = EFX_REVERB_PRESET_WOODEN_MEDIUMROOM;
589 EFXEAXREVERBPROPERTIES prop65 = EFX_REVERB_PRESET_WOODEN_LARGEROOM;
590 EFXEAXREVERBPROPERTIES prop66 = EFX_REVERB_PRESET_WOODEN_LONGPASSAGE;
591 EFXEAXREVERBPROPERTIES prop67 = EFX_REVERB_PRESET_WOODEN_HALL;
592 EFXEAXREVERBPROPERTIES prop68 = EFX_REVERB_PRESET_WOODEN_CUPBOARD;
593 EFXEAXREVERBPROPERTIES prop69 = EFX_REVERB_PRESET_WOODEN_COURTYARD;
594 EFXEAXREVERBPROPERTIES prop70 = EFX_REVERB_PRESET_WOODEN_ALCOVE;
595 EFXEAXREVERBPROPERTIES prop71 = EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM;
596 EFXEAXREVERBPROPERTIES prop72 = EFX_REVERB_PRESET_SPORT_SQUASHCOURT;
597 EFXEAXREVERBPROPERTIES prop73 = EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL;
598 EFXEAXREVERBPROPERTIES prop74 = EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL;
599 EFXEAXREVERBPROPERTIES prop75 = EFX_REVERB_PRESET_SPORT_GYMNASIUM;
600 EFXEAXREVERBPROPERTIES prop76 = EFX_REVERB_PRESET_SPORT_FULLSTADIUM;
601 EFXEAXREVERBPROPERTIES prop77 = EFX_REVERB_PRESET_SPORT_STADIUMTANNOY;
602 EFXEAXREVERBPROPERTIES prop78 = EFX_REVERB_PRESET_PREFAB_WORKSHOP;
603 EFXEAXREVERBPROPERTIES prop79 = EFX_REVERB_PRESET_PREFAB_SCHOOLROOM;
604 EFXEAXREVERBPROPERTIES prop80 = EFX_REVERB_PRESET_PREFAB_PRACTISEROOM;
605 EFXEAXREVERBPROPERTIES prop81 = EFX_REVERB_PRESET_PREFAB_OUTHOUSE;
606 EFXEAXREVERBPROPERTIES prop82 = EFX_REVERB_PRESET_PREFAB_CARAVAN;
607 EFXEAXREVERBPROPERTIES prop83 = EFX_REVERB_PRESET_DOME_TOMB;
608 EFXEAXREVERBPROPERTIES prop84 = EFX_REVERB_PRESET_PIPE_SMALL;
609 EFXEAXREVERBPROPERTIES prop85 = EFX_REVERB_PRESET_DOME_SAINTPAULS;
610 EFXEAXREVERBPROPERTIES prop86 = EFX_REVERB_PRESET_PIPE_LONGTHIN;
611 EFXEAXREVERBPROPERTIES prop87 = EFX_REVERB_PRESET_PIPE_LARGE;
612 EFXEAXREVERBPROPERTIES prop88 = EFX_REVERB_PRESET_PIPE_RESONANT;
613 EFXEAXREVERBPROPERTIES prop89 = EFX_REVERB_PRESET_OUTDOORS_BACKYARD;
614 EFXEAXREVERBPROPERTIES prop90 = EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS;
615 EFXEAXREVERBPROPERTIES prop91 = EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON;
616 EFXEAXREVERBPROPERTIES prop92 = EFX_REVERB_PRESET_OUTDOORS_CREEK;
617 EFXEAXREVERBPROPERTIES prop93 = EFX_REVERB_PRESET_OUTDOORS_VALLEY;
618 EFXEAXREVERBPROPERTIES prop94 = EFX_REVERB_PRESET_MOOD_HEAVEN;
619 EFXEAXREVERBPROPERTIES prop95 = EFX_REVERB_PRESET_MOOD_HELL;
620 EFXEAXREVERBPROPERTIES prop96 = EFX_REVERB_PRESET_MOOD_MEMORY;
621 EFXEAXREVERBPROPERTIES prop97 = EFX_REVERB_PRESET_DRIVING_COMMENTATOR;
622 EFXEAXREVERBPROPERTIES prop98 = EFX_REVERB_PRESET_DRIVING_PITGARAGE;
623 EFXEAXREVERBPROPERTIES prop99 = EFX_REVERB_PRESET_DRIVING_INCAR_RACER;
624 EFXEAXREVERBPROPERTIES prop100 = EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS;
625 EFXEAXREVERBPROPERTIES prop101 = EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY;
626 EFXEAXREVERBPROPERTIES prop102 = EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND;
627 EFXEAXREVERBPROPERTIES prop103 = EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND;
628 EFXEAXREVERBPROPERTIES prop104 = EFX_REVERB_PRESET_DRIVING_TUNNEL;
629 EFXEAXREVERBPROPERTIES prop105 = EFX_REVERB_PRESET_CITY_STREETS;
630 EFXEAXREVERBPROPERTIES prop106 = EFX_REVERB_PRESET_CITY_SUBWAY;
631 EFXEAXREVERBPROPERTIES prop107 = EFX_REVERB_PRESET_CITY_MUSEUM;
632 EFXEAXREVERBPROPERTIES prop108 = EFX_REVERB_PRESET_CITY_LIBRARY;
633 EFXEAXREVERBPROPERTIES prop109 = EFX_REVERB_PRESET_CITY_UNDERPASS;
634 EFXEAXREVERBPROPERTIES prop110 = EFX_REVERB_PRESET_CITY_ABANDONED;
635 EFXEAXREVERBPROPERTIES prop111 = EFX_REVERB_PRESET_DUSTYROOM;
636 EFXEAXREVERBPROPERTIES prop112 = EFX_REVERB_PRESET_CHAPEL;
637 EFXEAXREVERBPROPERTIES prop113 = EFX_REVERB_PRESET_SMALLWATERROOM;
#define FL_WARN(logger, msg)
The distortion effect simulates turning up (overdriving) the gain stage on a guitar amplifier or addi...
void setEnabled(bool enabled)
Enables or disables the effect.
void enableDirectSoundFilter(SoundFilter *filter)
Enables given direct SoundFilter.
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot
SoundFilterEmitterMap m_filterdEmitters
void removeEmitterFromSoundEffect(SoundEffect *effect, SoundEmitter *emitter)
Removes given SoundEmitter from the specific SoundEffect.
The Automatic Gain Control effect performs the same task as a studio compressor – evening out the aud...
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv
void init(ALCdevice *device)
Initializes the effect system.
void deactivateFilter(SoundFilter *filter, SoundEmitter *emitter)
Internal function to do the OpenAL calls to deactivate the SoundFilter for the SoundEmitter.
void removeEffect(SoundEffect *effect)
Removes effect.
Helper class to create log strings out from separate parts Usage: LMsg("some text") << variable << "...
SoundEffectPreset
Presets for EAX Reverb.
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv
void activateEffect(SoundEffect *effect, SoundEmitter *emitter)
Internal function to do the OpenAL calls to activate the SoundEffect for the SoundEmitter.
bool m_active
If sound effect module is active.
void deleteSoundFilter(SoundFilter *filter)
Deletes given SoundFilter.
ALCdevice * m_device
OpenAL device.
SoundFilter * getFilter()
Return sound filter or NULL.
The vocal morpher consists of a pair of 4-band formant filters, used to impose vocal tract effects up...
ALint m_maxSlots
Maximal effect slots per Source.
SoundEffect * createSoundEffect(SoundEffectType type)
Creates SoundEffect of the specific type.
Base class for Efx sound effects.
The class defines filters.
The chorus effect essentially replays the input audio accompanied by another slightly delayed version...
void addSoundFilterToSoundEffect(SoundEffect *effect, SoundFilter *filter)
Adds given SoundFilter to the SoundEffect.
static Logger _log(LM_AUDIO)
void disableSoundEffect(SoundEffect *effect)
Disables given SoundEffect.
bool isActive() const
Return if the Emitter is active / have an openAl-source.
void createPresets()
Inital the presets.
ALuint getFilterId() const
Return the OpenAL filter handle.
ALuint getEffectId() const
Return the OpenAL effect handle.
LPALGETFILTERFV alGetFilterfv
LPALGENFILTERS alGenFilters
SoundEffectEmitterMap m_effectEmitters
SoundFilterEffectMap m_filterdEffects
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv
void addEmitterToDirectSoundFilter(SoundFilter *filter, SoundEmitter *emitter)
Adds given SoundEmitter to the specific direct SoundFilter Note: A SoundEmitter can only have one dir...
void removeSoundFilterFromSoundEffect(SoundEffect *effect, SoundFilter *filter)
Removes given SoundFilter from the SoundEffect.
LPALGETFILTERIV alGetFilteriv
bool isEnabled() const
Return true if the filter is enabled, false otherwise.
ALuint getSlotId()
Return the OpenAL auxiliary slot handle.
uint8_t getEffectCount()
Return the number of effects.
LPALGETFILTERF alGetFilterf
void disableDirectSoundFilter(SoundFilter *filter)
Disables given SoundFilter.
LPALDELETEFILTERS alDeleteFilters
LPALGENEFFECTS alGenEffects
void setDirectFilter(SoundFilter *filter)
Sets the direct filter.
uint16_t m_createdSlots
Maximal created effect slots, can be different to MAX_EFFECT_SLOTS.
The Equalizer providing tonal control over four different adjustable frequency ranges.
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti
The frequency shifter is a single-sideband modulator, which translates all the component frequencies ...
std::vector< SoundEffect * > m_effects
Holds all SoundEffects.
The Auto-wah effect emulates the sound of a wah-wah pedal used with an electric guitar, or a mute on a brass instrument.
LPALGETEFFECTIV alGetEffectiv
SoundFilter * createSoundFilter(SoundFilterType type)
Creates SoundFilter of the specific type.
void setFilter(SoundFilter *filter)
Sets the additional sound filter.
ALuint getSource() const
Return openAl-source.
LPALDELETEEFFECTS alDeleteEffects
void deleteSoundEffect(SoundEffect *effect)
Deletes given SoundEffect.
void removeEmitterFromDirectSoundFilter(SoundFilter *filter, SoundEmitter *emitter)
Removes given SoundEmitter from the specific direct SoundFilter.
LPALGETFILTERI alGetFilteri
SoundEffect * createSoundEffectPreset(SoundEffectPreset type)
Creates EaxReverb SoundEffect and loads the specific preset type.
bool isActive() const
Returns true if sound effect module is active.
void addEffect(SoundEffect *effect)
Adds effect.
The flanger effect creates a “tearing” or “whooshing” sound.
The class for playing audio files.
SoundEffectType
Sound effect type.
const uint16_t MAX_EFFECT_SLOTS
void deactivateEffect(SoundEffect *effect, SoundEmitter *emitter)
Internal function to do the OpenAL calls to deactivate the SoundEffect for the SoundEmitter.
The environmental reverberation effect.
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots
LPALGETEFFECTF alGetEffectf
The ring modulator multiplies an input signal by a carrier signal in the time domain, resulting in tremolo or inharmonic effects.
The EAX Reverb is similar to Reverb but supports more options.
std::queue< ALuint > m_freeSlots
Holds free handles for effect slots.
void activateFilter(SoundFilter *filter, SoundEmitter *emitter)
Internal function to do the OpenAL calls to activate the SoundFilter for the SoundEmitter.
The echo effect generates discrete, delayed instances of the input signal.
LPALGETEFFECTI alGetEffecti
void enableSoundEffect(SoundEffect *effect)
Enables given SoundEffect.
SoundFilterType
Sound filter type.
uint8_t getEffectNumber(SoundEffect *effect)
Return the number of the given effect.
ALuint m_effectSlots[MAX_EFFECT_SLOTS]
Holds handles for effects.
bool isEnabled() const
Return true if the effect is enabled, false otherwise.
~SoundEffectManager()
Destructor.
std::vector< SoundFilter * > m_filters
Holds all SoundFilters.
LPALGETEFFECTFV alGetEffectfv
void setSlotId(ALuint slot)
Sets the OpenAL auxiliary slot handle.
The pitch shifter applies time-invariant pitch shifting to the input signal, over a one octave range ...
void addEmitterToSoundEffect(SoundEffect *effect, SoundEmitter *emitter)
Adds given SoundEmitter to the specific SoundEffect.
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti
void loadPreset(const EFXEAXREVERBPROPERTIES &prop)
Load presets into the EAX reverb.
void setEnabled(bool enabled)
Enables or disables the filter.
SoundEffectManager()
Constructor.
std::map< SoundEffectPreset, EFXEAXREVERBPROPERTIES > m_presets
Establishes the relationship between SoundEffectPreset and EFXEAXREVERBPROPERTIES.
SoundFilter * getDirectFilter()
Return the direct filter.
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv