| 1 |
/*************************************************************************** |
| 2 |
* Copyright (C) 2005-2019 by the FIFE team * |
| 3 |
* http://www.fifengine.net * |
| 4 |
* This file is part of FIFE. * |
| 5 |
* * |
| 6 |
* FIFE is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of the GNU Lesser General Public * |
| 8 |
* License as published by the Free Software Foundation; either * |
| 9 |
* version 2.1 of the License, or (at your option) any later version. * |
| 10 |
* * |
| 11 |
* This library is distributed in the hope that it will be useful, * |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
| 14 |
* Lesser General Public License for more details. * |
| 15 |
* * |
| 16 |
* You should have received a copy of the GNU Lesser General Public * |
| 17 |
* License along with this library; if not, write to the * |
| 18 |
* Free Software Foundation, Inc., * |
| 19 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
| 20 |
***************************************************************************/ |
| 21 |
|
| 22 |
// Standard C++ library includes |
| 23 |
|
| 24 |
// Platform specific includes |
| 25 |
|
| 26 |
// 3rd party library includes |
| 27 |
|
| 28 |
// FIFE includes |
| 29 |
// These includes are split up in two parts, separated by one empty line |
| 30 |
// First block: files included from the FIFE root src directory |
| 31 |
// Second block: files included from the same folder |
| 32 |
#include "audio/soundemitter.h" |
| 33 |
#include "util/log/logger.h" |
| 34 |
#include "util/base/exception.h" |
| 35 |
|
| 36 |
#include "soundeffect.h" |
| 37 |
#include "soundfilter.h" |
| 38 |
#include "soundeffectmanager.h" |
| 39 |
|
| 40 |
namespace FIFE { |
| 41 |
/** Logger to use for this source file. |
| 42 |
* @relates Logger |
| 43 |
*/ |
| 44 |
static Logger _log(LM_AUDIO); |
| 45 |
|
| 46 |
|
| 47 |
// Effect Slots |
| 48 |
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots = NULL; |
| 49 |
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots = NULL; |
| 50 |
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot = NULL; |
| 51 |
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti = NULL; |
| 52 |
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv = NULL; |
| 53 |
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf = NULL; |
| 54 |
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv = NULL; |
| 55 |
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti = NULL; |
| 56 |
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv = NULL; |
| 57 |
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf = NULL; |
| 58 |
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv = NULL; |
| 59 |
|
| 60 |
// Effects |
| 61 |
LPALGENEFFECTS alGenEffects = NULL; |
| 62 |
LPALDELETEEFFECTS alDeleteEffects = NULL; |
| 63 |
LPALISEFFECT alIsEffect = NULL; |
| 64 |
LPALEFFECTI alEffecti = NULL; |
| 65 |
LPALEFFECTIV alEffectiv = NULL; |
| 66 |
LPALEFFECTF alEffectf = NULL; |
| 67 |
LPALEFFECTFV alEffectfv = NULL; |
| 68 |
LPALGETEFFECTI alGetEffecti = NULL; |
| 69 |
LPALGETEFFECTIV alGetEffectiv = NULL; |
| 70 |
LPALGETEFFECTF alGetEffectf = NULL; |
| 71 |
LPALGETEFFECTFV alGetEffectfv = NULL; |
| 72 |
|
| 73 |
// Filters |
| 74 |
LPALGENFILTERS alGenFilters = NULL; |
| 75 |
LPALDELETEFILTERS alDeleteFilters = NULL; |
| 76 |
LPALISFILTER alIsFilter = NULL; |
| 77 |
LPALFILTERI alFilteri = NULL; |
| 78 |
LPALFILTERIV alFilteriv = NULL; |
| 79 |
LPALFILTERF alFilterf = NULL; |
| 80 |
LPALFILTERFV alFilterfv = NULL; |
| 81 |
LPALGETFILTERI alGetFilteri = NULL; |
| 82 |
LPALGETFILTERIV alGetFilteriv = NULL; |
| 83 |
LPALGETFILTERF alGetFilterf = NULL; |
| 84 |
LPALGETFILTERFV alGetFilterfv = NULL; |
| 85 |
|
| 86 |
|
| 87 |
SoundEffectManager::SoundEffectManager() : |
| 88 |
m_device(NULL), |
| 89 |
m_active(false), |
| 90 |
m_createdSlots(0), |
| 91 |
m_maxSlots(0) { |
| 92 |
|
| 93 |
} |
| 94 |
|
| 95 |
SoundEffectManager::~SoundEffectManager() { |
| 96 |
// SoundEmitters are destroyed beforehand |
| 97 |
for (std::vector<SoundFilter*>::iterator it = m_filters.begin(); it != m_filters.end(); ++it) { |
| 98 |
delete *it; |
| 99 |
} |
| 100 |
for (std::vector<SoundEffect*>::iterator it = m_effects.begin(); it != m_effects.end(); ++it) { |
| 101 |
delete *it; |
| 102 |
} |
| 103 |
} |
| 104 |
|
| 105 |
void SoundEffectManager::init(ALCdevice* device) { |
| 106 |
m_device = device; |
| 107 |
|
| 108 |
if (alcIsExtensionPresent(m_device, "ALC_EXT_EFX") == AL_FALSE) { |
| 109 |
FL_WARN(_log, LMsg() << "ALC_EXT_EFX not supported!\n"); |
| 110 |
return; |
| 111 |
} |
| 112 |
|
| 113 |
// Slot functions |
| 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"); |
| 130 |
return; |
| 131 |
} |
| 132 |
|
| 133 |
// Effect functions |
| 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"); |
| 148 |
return; |
| 149 |
} |
| 150 |
|
| 151 |
// Filter functions |
| 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"); |
| 166 |
return; |
| 167 |
} |
| 168 |
|
| 169 |
m_active = true; |
| 170 |
|
| 171 |
// create max effect slots |
| 172 |
for (uint16_t i = 0; i < MAX_EFFECT_SLOTS; i++) { |
| 173 |
alGenAuxiliaryEffectSlots(1, &m_effectSlots[i]); |
| 174 |
if (alGetError() != AL_NO_ERROR) { |
| 175 |
break; |
| 176 |
} |
| 177 |
|
| 178 |
m_freeSlots.push(m_effectSlots[i]); |
| 179 |
m_createdSlots++; |
| 180 |
} |
| 181 |
// fetch maximal slots per source |
| 182 |
alcGetIntegerv(m_device, ALC_MAX_AUXILIARY_SENDS, 1, &m_maxSlots); |
| 183 |
// prepares the presets |
| 184 |
createPresets(); |
| 185 |
} |
| 186 |
|
| 187 |
bool SoundEffectManager::isActive() const { |
| 188 |
return m_active; |
| 189 |
} |
| 190 |
|
| 191 |
SoundEffect* SoundEffectManager::createSoundEffect(SoundEffectType type) { |
| 192 |
SoundEffect* effect = NULL; |
| 193 |
if (type == SE_EFFECT_REVERB) { |
| 194 |
effect = new Reverb(); |
| 195 |
} else if (type == SE_EFFECT_CHORUS) { |
| 196 |
effect = new Chorus(); |
| 197 |
} else if (type == SE_EFFECT_DISTORTION) { |
| 198 |
effect = new Distortion(); |
| 199 |
} else if (type == SE_EFFECT_ECHO) { |
| 200 |
effect = new Echo(); |
| 201 |
} else if (type == SE_EFFECT_FLANGER) { |
| 202 |
effect = new Flanger(); |
| 203 |
} else if (type == SE_EFFECT_FREQUENCY_SHIFTER) { |
| 204 |
effect = new FrequencyShifter(); |
| 205 |
} else if (type == SE_EFFECT_VOCAL_MORPHER) { |
| 206 |
effect = new VocalMorpher(); |
| 207 |
} else if (type == SE_EFFECT_PITCH_SHIFTER) { |
| 208 |
effect = new PitchShifter(); |
| 209 |
} else if (type == SE_EFFECT_RING_MODULATOR) { |
| 210 |
effect = new RingModulator(); |
| 211 |
} else if (type == SE_EFFECT_AUTOWAH) { |
| 212 |
effect = new Autowah(); |
| 213 |
} else if (type == SE_EFFECT_COMPRESSOR) { |
| 214 |
effect = new Compressor(); |
| 215 |
} else if (type == SE_EFFECT_EQUALIZER) { |
| 216 |
effect = new Equalizer(); |
| 217 |
} else if (type == SE_EFFECT_EAXREVERB) { |
| 218 |
effect = new EaxReverb(); |
| 219 |
} |
| 220 |
if (effect) { |
| 221 |
m_effects.push_back(effect); |
| 222 |
} |
| 223 |
return effect; |
| 224 |
} |
| 225 |
|
| 226 |
SoundEffect* SoundEffectManager::createSoundEffectPreset(SoundEffectPreset type) { |
| 227 |
std::map<SoundEffectPreset, EFXEAXREVERBPROPERTIES>::iterator it = m_presets.find(type); |
| 228 |
if (it == m_presets.end()) { |
| 229 |
return NULL; |
| 230 |
} |
| 231 |
SoundEffect* effect = new EaxReverb(); |
| 232 |
m_effects.push_back(effect); |
| 233 |
|
| 234 |
EaxReverb* reverb = static_cast<EaxReverb*>(effect); |
| 235 |
reverb->loadPreset(it->second); |
| 236 |
return effect; |
| 237 |
} |
| 238 |
|
| 239 |
void SoundEffectManager::deleteSoundEffect(SoundEffect* effect) { |
| 240 |
disableSoundEffect(effect); |
| 241 |
if (effect->getFilter()) { |
| 242 |
removeSoundFilterFromSoundEffect(effect, effect->getFilter()); |
| 243 |
} |
| 244 |
for (std::vector<SoundEffect*>::iterator it = m_effects.begin(); it != m_effects.end(); ++it) { |
| 245 |
if (effect == *it) { |
| 246 |
SoundEffectEmitterMap::iterator effectIt = m_effectEmitters.find(effect); |
| 247 |
if (effectIt != m_effectEmitters.end()) { |
| 248 |
std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin(); |
| 249 |
for (; emitterIt != effectIt->second.end(); ++emitterIt) { |
| 250 |
(*emitterIt)->removeEffect(effect); |
| 251 |
} |
| 252 |
} |
| 253 |
m_effectEmitters.erase(effectIt); |
| 254 |
delete *it; |
| 255 |
m_effects.erase(it); |
| 256 |
break; |
| 257 |
} |
| 258 |
} |
| 259 |
} |
| 260 |
|
| 261 |
void SoundEffectManager::enableSoundEffect(SoundEffect* effect) { |
| 262 |
if (m_freeSlots.empty() || effect->isEnabled()) { |
| 263 |
if (m_freeSlots.empty()) { |
| 264 |
FL_WARN(_log, LMsg() << "No free auxiliary slot available"); |
| 265 |
} |
| 266 |
return; |
| 267 |
} |
| 268 |
|
| 269 |
ALuint slot = m_freeSlots.front(); |
| 270 |
ALuint filter = effect->getFilter() ? effect->getFilter()->getFilterId() : AL_FILTER_NULL; |
| 271 |
m_freeSlots.pop(); |
| 272 |
alAuxiliaryEffectSloti(slot, AL_EFFECTSLOT_EFFECT, effect->getEffectId()); |
| 273 |
effect->setSlotId(slot); |
| 274 |
effect->setEnabled(true); |
| 275 |
SoundEffectEmitterMap::iterator effectIt = m_effectEmitters.find(effect); |
| 276 |
if (effectIt != m_effectEmitters.end()) { |
| 277 |
std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin(); |
| 278 |
for (; emitterIt != effectIt->second.end(); ++emitterIt) { |
| 279 |
if (!(*emitterIt)->isActive()) { |
| 280 |
continue; |
| 281 |
} |
| 282 |
activateEffect(effect, *emitterIt); |
| 283 |
} |
| 284 |
} |
| 285 |
} |
| 286 |
|
| 287 |
void SoundEffectManager::disableSoundEffect(SoundEffect* effect) { |
| 288 |
if (!effect->isEnabled()) { |
| 289 |
return; |
| 290 |
} |
| 291 |
alAuxiliaryEffectSloti(effect->getSlotId(), AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL); |
| 292 |
m_freeSlots.push(effect->getSlotId()); |
| 293 |
effect->setSlotId(0); |
| 294 |
|
| 295 |
SoundEffectEmitterMap::iterator effectIt = m_effectEmitters.find(effect); |
| 296 |
if (effectIt != m_effectEmitters.end()) { |
| 297 |
std::vector<SoundEmitter*>::iterator emitterIt = effectIt->second.begin(); |
| 298 |
for (; emitterIt != effectIt->second.end(); ++emitterIt) { |
| 299 |
deactivateEffect(effect, *emitterIt); |
| 300 |
} |
| 301 |
} |
| 302 |
effect->setEnabled(false); |
| 303 |
} |
| 304 |
|
| 305 |
void SoundEffectManager::addEmitterToSoundEffect(SoundEffect* effect, SoundEmitter* emitter) { |
| 306 |
if (emitter->getEffectCount() == m_maxSlots) { |
| 307 |
FL_WARN(_log, LMsg() << "Maximal effect number for SoundEmitter reached"); |
| 308 |
return; |
| 309 |
} |
| 310 |
m_effectEmitters[effect].push_back(emitter); |
| 311 |
emitter->addEffect(effect); |
| 312 |
if (emitter-isActive()) { |
| 313 |
activateEffect(effect, emitter); |
| 314 |
} |
| 315 |
} |
| 316 |
|
| 317 |
void SoundEffectManager::removeEmitterFromSoundEffect(SoundEffect* effect, SoundEmitter* emitter) { |
| 318 |
SoundEffectEmitterMap::iterator effectIt = m_effectEmitters.find(effect); |
| 319 |
if (effectIt == m_effectEmitters.end()) { |
| 320 |
FL_WARN(_log, LMsg() << "SoundEmitter can not removed from unknown effect"); |
| 321 |
return; |
| 322 |
} |
| 323 |
bool found = false; |
| 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) { |
| 328 |
if (emitter->isActive()) { |
| 329 |
deactivateEffect(effect, emitter); |
| 330 |
} |
| 331 |
emitter->removeEffect(effect); |
| 332 |
effectIt->second.erase(emitterIt++); |
| 333 |
found = true; |
| 334 |
} else { |
| 335 |
++emitterIt; |
| 336 |
} |
| 337 |
} |
| 338 |
if (!found) { |
| 339 |
FL_WARN(_log, LMsg() << "SoundEmitter could not be found for the given effect."); |
| 340 |
return; |
| 341 |
} |
| 342 |
} |
| 343 |
|
| 344 |
void SoundEffectManager::addSoundFilterToSoundEffect(SoundEffect* effect, SoundFilter* filter) { |
| 345 |
if (effect->getFilter()) { |
| 346 |
FL_WARN(_log, LMsg() << "SoundEffect already has a filter"); |
| 347 |
return; |
| 348 |
} |
| 349 |
effect->setFilter(filter); |
| 350 |
m_filterdEffects[filter].push_back(effect); |
| 351 |
if (effect->isEnabled()) { |
| 352 |
disableSoundEffect(effect); |
| 353 |
enableSoundEffect(effect); |
| 354 |
} |
| 355 |
} |
| 356 |
|
| 357 |
void SoundEffectManager::removeSoundFilterFromSoundEffect(SoundEffect* effect, SoundFilter* filter) { |
| 358 |
SoundFilterEffectMap::iterator filterIt = m_filterdEffects.find(filter); |
| 359 |
if (filterIt == m_filterdEffects.end()) { |
| 360 |
FL_WARN(_log, LMsg() << "SoundEffect can not removed from unknown filter"); |
| 361 |
return; |
| 362 |
} |
| 363 |
bool found = false; |
| 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) { |
| 368 |
effect->setFilter(NULL); |
| 369 |
if (effect->isEnabled()) { |
| 370 |
disableSoundEffect(effect); |
| 371 |
enableSoundEffect(effect); |
| 372 |
} |
| 373 |
filterIt->second.erase(effectIt++); |
| 374 |
found = true; |
| 375 |
} |
| 376 |
else { |
| 377 |
++effectIt; |
| 378 |
} |
| 379 |
} |
| 380 |
if (!found) { |
| 381 |
FL_WARN(_log, LMsg() << "SoundEffect could not be found for the given filter."); |
| 382 |
return; |
| 383 |
} |
| 384 |
} |
| 385 |
|
| 386 |
void SoundEffectManager::activateEffect(SoundEffect* effect, SoundEmitter* emitter) { |
| 387 |
if (!effect->isEnabled()) { |
| 388 |
return; |
| 389 |
} |
| 390 |
ALuint number = static_cast<ALuint>(emitter->getEffectNumber(effect)); |
| 391 |
ALuint filter = effect->getFilter() ? effect->getFilter()->getFilterId() : AL_FILTER_NULL; |
| 392 |
alSource3i(emitter->getSource(), AL_AUXILIARY_SEND_FILTER, effect->getSlotId(), number, filter); |
| 393 |
} |
| 394 |
|
| 395 |
void SoundEffectManager::deactivateEffect(SoundEffect* effect, SoundEmitter* emitter) { |
| 396 |
if (!effect->isEnabled()) { |
| 397 |
return; |
| 398 |
} |
| 399 |
ALuint number = static_cast<ALuint>(emitter->getEffectNumber(effect)); |
| 400 |
alSource3i(emitter->getSource(), AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, number, AL_FILTER_NULL); |
| 401 |
} |
| 402 |
|
| 403 |
SoundFilter* SoundEffectManager::createSoundFilter(SoundFilterType type) { |
| 404 |
SoundFilter* filter = new SoundFilter(type); |
| 405 |
m_filters.push_back(filter); |
| 406 |
return filter; |
| 407 |
} |
| 408 |
|
| 409 |
void SoundEffectManager::deleteSoundFilter(SoundFilter* filter) { |
| 410 |
disableDirectSoundFilter(filter); |
| 411 |
for (std::vector<SoundFilter*>::iterator it = m_filters.begin(); it != m_filters.end(); ++it) { |
| 412 |
if (filter == *it) { |
| 413 |
SoundFilterEmitterMap::iterator filterIt = m_filterdEmitters.find(filter); |
| 414 |
if (filterIt != m_filterdEmitters.end()) { |
| 415 |
std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin(); |
| 416 |
for (; emitterIt != filterIt->second.end(); ++emitterIt) { |
| 417 |
(*emitterIt)->setDirectFilter(NULL); |
| 418 |
} |
| 419 |
} |
| 420 |
m_filterdEmitters.erase(filterIt); |
| 421 |
SoundFilterEffectMap::iterator filterItt = m_filterdEffects.find(filter); |
| 422 |
if (filterItt != m_filterdEffects.end()) { |
| 423 |
std::vector<SoundEffect*>::iterator effectIt = filterItt->second.begin(); |
| 424 |
for (; effectIt != filterItt->second.end(); ++effectIt) { |
| 425 |
(*effectIt)->setFilter(NULL); |
| 426 |
if ((*effectIt)->isEnabled()) { |
| 427 |
disableSoundEffect(*effectIt); |
| 428 |
enableSoundEffect(*effectIt); |
| 429 |
} |
| 430 |
} |
| 431 |
} |
| 432 |
m_filterdEffects.erase(filterItt); |
| 433 |
delete *it; |
| 434 |
m_filters.erase(it); |
| 435 |
break; |
| 436 |
} |
| 437 |
} |
| 438 |
} |
| 439 |
|
| 440 |
void SoundEffectManager::enableDirectSoundFilter(SoundFilter* filter) { |
| 441 |
if (filter->isEnabled()) { |
| 442 |
return; |
| 443 |
} |
| 444 |
filter->setEnabled(true); |
| 445 |
SoundFilterEmitterMap::iterator filterIt = m_filterdEmitters.find(filter); |
| 446 |
if (filterIt != m_filterdEmitters.end()) { |
| 447 |
std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin(); |
| 448 |
for (; emitterIt != filterIt->second.end(); ++emitterIt) { |
| 449 |
if ((*emitterIt)->isActive()) { |
| 450 |
activateFilter(filter, *emitterIt); |
| 451 |
} |
| 452 |
} |
| 453 |
} |
| 454 |
} |
| 455 |
|
| 456 |
void SoundEffectManager::disableDirectSoundFilter(SoundFilter* filter) { |
| 457 |
if (!filter->isEnabled()) { |
| 458 |
return; |
| 459 |
} |
| 460 |
SoundFilterEmitterMap::iterator filterIt = m_filterdEmitters.find(filter); |
| 461 |
if (filterIt != m_filterdEmitters.end()) { |
| 462 |
std::vector<SoundEmitter*>::iterator emitterIt = filterIt->second.begin(); |
| 463 |
for (; emitterIt != filterIt->second.end(); ++emitterIt) { |
| 464 |
if ((*emitterIt)->isActive()) { |
| 465 |
deactivateFilter(filter, *emitterIt); |
| 466 |
} |
| 467 |
} |
| 468 |
} |
| 469 |
filter->setEnabled(false); |
| 470 |
} |
| 471 |
|
| 472 |
void SoundEffectManager::addEmitterToDirectSoundFilter(SoundFilter* filter, SoundEmitter* emitter) { |
| 473 |
if (emitter->getDirectFilter()) { |
| 474 |
FL_WARN(_log, LMsg() << "SoundEmitter already has a direct filter"); |
| 475 |
return; |
| 476 |
} |
| 477 |
emitter->setDirectFilter(filter); |
| 478 |
m_filterdEmitters[filter].push_back(emitter); |
| 479 |
if (emitter->isActive()) { |
| 480 |
activateFilter(filter, emitter); |
| 481 |
} |
| 482 |
} |
| 483 |
|
| 484 |
void SoundEffectManager::removeEmitterFromDirectSoundFilter(SoundFilter* filter, SoundEmitter* emitter) { |
| 485 |
SoundFilterEmitterMap::iterator filterIt = m_filterdEmitters.find(filter); |
| 486 |
if (filterIt == m_filterdEmitters.end()) { |
| 487 |
FL_WARN(_log, LMsg() << "SoundEmitter can not removed from unknown filter"); |
| 488 |
return; |
| 489 |
} |
| 490 |
bool found = false; |
| 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) { |
| 495 |
if (emitter->isActive()) { |
| 496 |
deactivateFilter(filter, emitter); |
| 497 |
} |
| 498 |
emitter->setDirectFilter(NULL); |
| 499 |
filterIt->second.erase(emitterIt++); |
| 500 |
found = true; |
| 501 |
} |
| 502 |
else { |
| 503 |
++emitterIt; |
| 504 |
} |
| 505 |
} |
| 506 |
if (!found) { |
| 507 |
FL_WARN(_log, LMsg() << "SoundEmitter could not be found for the given filter."); |
| 508 |
return; |
| 509 |
} |
| 510 |
} |
| 511 |
|
| 512 |
void SoundEffectManager::activateFilter(SoundFilter* filter, SoundEmitter* emitter) { |
| 513 |
if (filter->isEnabled()) { |
| 514 |
alSourcei(emitter->getSource(), AL_DIRECT_FILTER, filter->getFilterId()); |
| 515 |
} |
| 516 |
} |
| 517 |
|
| 518 |
void SoundEffectManager::deactivateFilter(SoundFilter* filter, SoundEmitter* emitter) { |
| 519 |
if (filter->isEnabled()) { |
| 520 |
alSourcei(emitter->getSource(), AL_DIRECT_FILTER, AL_FILTER_NULL); |
| 521 |
} |
| 522 |
} |
| 523 |
|
| 524 |
void SoundEffectManager::createPresets() { |
| 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; |
| 638 |
|
| 639 |
m_presets[SE_PRESET_GENERIC] = prop1; |
| 640 |
m_presets[SE_PRESET_PADDEDCELL] = prop2; |
| 641 |
m_presets[SE_PRESET_ROOM] = prop3; |
| 642 |
m_presets[SE_PRESET_BATHROOM] = prop4; |
| 643 |
m_presets[SE_PRESET_LIVINGROOM] = prop5; |
| 644 |
m_presets[SE_PRESET_STONEROOM] = prop6; |
| 645 |
m_presets[SE_PRESET_AUDITORIUM] = prop7; |
| 646 |
m_presets[SE_PRESET_CONCERTHALL] = prop8; |
| 647 |
m_presets[SE_PRESET_CAVE] = prop9; |
| 648 |
m_presets[SE_PRESET_ARENA] = prop10; |
| 649 |
m_presets[SE_PRESET_HANGAR] = prop11; |
| 650 |
m_presets[SE_PRESET_CARPETEDHALLWAY] = prop12; |
| 651 |
m_presets[SE_PRESET_HALLWAY] = prop13; |
| 652 |
m_presets[SE_PRESET_STONECORRIDOR] = prop14; |
| 653 |
m_presets[SE_PRESET_ALLEY] = prop15; |
| 654 |
m_presets[SE_PRESET_FOREST] = prop16; |
| 655 |
m_presets[SE_PRESET_CITY] = prop17; |
| 656 |
m_presets[SE_PRESET_MOUNTAINS] = prop18; |
| 657 |
m_presets[SE_PRESET_QUARRY] = prop19; |
| 658 |
m_presets[SE_PRESET_PLAIN] = prop20; |
| 659 |
m_presets[SE_PRESET_PARKINGLOT] = prop21; |
| 660 |
m_presets[SE_PRESET_SEWERPIPE] = prop22; |
| 661 |
m_presets[SE_PRESET_UNDERWATER] = prop23; |
| 662 |
m_presets[SE_PRESET_DRUGGED] = prop24; |
| 663 |
m_presets[SE_PRESET_DIZZY] = prop25; |
| 664 |
m_presets[SE_PRESET_PSYCHOTIC] = prop26; |
| 665 |
m_presets[SE_PRESET_CASTLE_SMALLROOM] = prop27; |
| 666 |
m_presets[SE_PRESET_CASTLE_SHORTPASSAGE] = prop28; |
| 667 |
m_presets[SE_PRESET_CASTLE_MEDIUMROOM] = prop29; |
| 668 |
m_presets[SE_PRESET_CASTLE_LARGEROOM] = prop30; |
| 669 |
m_presets[SE_PRESET_CASTLE_LONGPASSAGE] = prop31; |
| 670 |
m_presets[SE_PRESET_CASTLE_HALL] = prop32; |
| 671 |
m_presets[SE_PRESET_CASTLE_CUPBOARD] = prop33; |
| 672 |
m_presets[SE_PRESET_CASTLE_COURTYARD] = prop34; |
| 673 |
m_presets[SE_PRESET_CASTLE_ALCOVE] = prop35; |
| 674 |
m_presets[SE_PRESET_FACTORY_SMALLROOM] = prop36; |
| 675 |
m_presets[SE_PRESET_FACTORY_SHORTPASSAGE] = prop37; |
| 676 |
m_presets[SE_PRESET_FACTORY_MEDIUMROOM] = prop38; |
| 677 |
m_presets[SE_PRESET_FACTORY_LARGEROOM] = prop39; |
| 678 |
m_presets[SE_PRESET_FACTORY_LONGPASSAGE] = prop40; |
| 679 |
m_presets[SE_PRESET_FACTORY_HALL] = prop41; |
| 680 |
m_presets[SE_PRESET_FACTORY_CUPBOARD] = prop42; |
| 681 |
m_presets[SE_PRESET_FACTORY_COURTYARD] = prop43; |
| 682 |
m_presets[SE_PRESET_FACTORY_ALCOVE] = prop44; |
| 683 |
m_presets[SE_PRESET_ICEPALACE_SMALLROOM] = prop45; |
| 684 |
m_presets[SE_PRESET_ICEPALACE_SHORTPASSAGE] = prop46; |
| 685 |
m_presets[SE_PRESET_ICEPALACE_MEDIUMROOM] = prop47; |
| 686 |
m_presets[SE_PRESET_ICEPALACE_LARGEROOM] = prop48; |
| 687 |
m_presets[SE_PRESET_ICEPALACE_LONGPASSAGE] = prop49; |
| 688 |
m_presets[SE_PRESET_ICEPALACE_HALL] = prop50; |
| 689 |
m_presets[SE_PRESET_ICEPALACE_CUPBOARD] = prop51; |
| 690 |
m_presets[SE_PRESET_ICEPALACE_COURTYARD] = prop52; |
| 691 |
m_presets[SE_PRESET_ICEPALACE_ALCOVE] = prop53; |
| 692 |
m_presets[SE_PRESET_SPACESTATION_SMALLROOM] = prop54; |
| 693 |
m_presets[SE_PRESET_SPACESTATION_SHORTPASSAGE] = prop55; |
| 694 |
m_presets[SE_PRESET_SPACESTATION_MEDIUMROOM] = prop56; |
| 695 |
m_presets[SE_PRESET_SPACESTATION_LARGEROOM] = prop57; |
| 696 |
m_presets[SE_PRESET_SPACESTATION_LONGPASSAGE] = prop58; |
| 697 |
m_presets[SE_PRESET_SPACESTATION_HALL] = prop59; |
| 698 |
m_presets[SE_PRESET_SPACESTATION_CUPBOARD] = prop60; |
| 699 |
m_presets[SE_PRESET_SPACESTATION_ALCOVE] = prop61; |
| 700 |
m_presets[SE_PRESET_WOODEN_SMALLROOM] = prop62; |
| 701 |
m_presets[SE_PRESET_WOODEN_SHORTPASSAGE] = prop63; |
| 702 |
m_presets[SE_PRESET_WOODEN_MEDIUMROOM] = prop64; |
| 703 |
m_presets[SE_PRESET_WOODEN_LARGEROOM] = prop65; |
| 704 |
m_presets[SE_PRESET_WOODEN_LONGPASSAGE] = prop66; |
| 705 |
m_presets[SE_PRESET_WOODEN_HALL] = prop67; |
| 706 |
m_presets[SE_PRESET_WOODEN_CUPBOARD] = prop68; |
| 707 |
m_presets[SE_PRESET_WOODEN_COURTYARD] = prop69; |
| 708 |
m_presets[SE_PRESET_WOODEN_ALCOVE] = prop70; |
| 709 |
m_presets[SE_PRESET_SPORT_EMPTYSTADIUM] = prop71; |
| 710 |
m_presets[SE_PRESET_SPORT_SQUASHCOURT] = prop72; |
| 711 |
m_presets[SE_PRESET_SPORT_SMALLSWIMMINGPOOL] = prop73; |
| 712 |
m_presets[SE_PRESET_SPORT_LARGESWIMMINGPOOL] = prop74; |
| 713 |
m_presets[SE_PRESET_SPORT_GYMNASIUM] = prop75; |
| 714 |
m_presets[SE_PRESET_SPORT_FULLSTADIUM] = prop76; |
| 715 |
m_presets[SE_PRESET_SPORT_STADIUMTANNOY] = prop77; |
| 716 |
m_presets[SE_PRESET_PREFAB_WORKSHOP] = prop78; |
| 717 |
m_presets[SE_PRESET_PREFAB_SCHOOLROOM] = prop79; |
| 718 |
m_presets[SE_PRESET_PREFAB_PRACTISEROOM] = prop80; |
| 719 |
m_presets[SE_PRESET_PREFAB_OUTHOUSE] = prop81; |
| 720 |
m_presets[SE_PRESET_PREFAB_CARAVAN] = prop82; |
| 721 |
m_presets[SE_PRESET_DOME_TOMB] = prop83; |
| 722 |
m_presets[SE_PRESET_PIPE_SMALL] = prop84; |
| 723 |
m_presets[SE_PRESET_DOME_SAINTPAULS] = prop85; |
| 724 |
m_presets[SE_PRESET_PIPE_LONGTHIN] = prop86; |
| 725 |
m_presets[SE_PRESET_PIPE_LARGE] = prop87; |
| 726 |
m_presets[SE_PRESET_PIPE_RESONANT] = prop88; |
| 727 |
m_presets[SE_PRESET_OUTDOORS_BACKYARD] = prop89; |
| 728 |
m_presets[SE_PRESET_OUTDOORS_ROLLINGPLAINS] = prop90; |
| 729 |
m_presets[SE_PRESET_OUTDOORS_DEEPCANYON] = prop91; |
| 730 |
m_presets[SE_PRESET_OUTDOORS_CREEK] = prop92; |
| 731 |
m_presets[SE_PRESET_OUTDOORS_VALLEY] = prop93; |
| 732 |
m_presets[SE_PRESET_MOOD_HEAVEN] = prop94; |
| 733 |
m_presets[SE_PRESET_MOOD_HELL] = prop95; |
| 734 |
m_presets[SE_PRESET_MOOD_MEMORY] = prop96; |
| 735 |
m_presets[SE_PRESET_DRIVING_COMMENTATOR] = prop97; |
| 736 |
m_presets[SE_PRESET_DRIVING_PITGARAGE] = prop98; |
| 737 |
m_presets[SE_PRESET_DRIVING_INCAR_RACER] = prop99; |
| 738 |
m_presets[SE_PRESET_DRIVING_INCAR_SPORTS] = prop100; |
| 739 |
m_presets[SE_PRESET_DRIVING_INCAR_LUXURY] = prop101; |
| 740 |
m_presets[SE_PRESET_DRIVING_FULLGRANDSTAND] = prop102; |
| 741 |
m_presets[SE_PRESET_DRIVING_EMPTYGRANDSTAND] = prop103; |
| 742 |
m_presets[SE_PRESET_DRIVING_TUNNEL] = prop104; |
| 743 |
m_presets[SE_PRESET_CITY_STREETS] = prop105; |
| 744 |
m_presets[SE_PRESET_CITY_SUBWAY] = prop106; |
| 745 |
m_presets[SE_PRESET_CITY_MUSEUM] = prop107; |
| 746 |
m_presets[SE_PRESET_CITY_LIBRARY] = prop108; |
| 747 |
m_presets[SE_PRESET_CITY_UNDERPASS] = prop109; |
| 748 |
m_presets[SE_PRESET_CITY_ABANDONED] = prop110; |
| 749 |
m_presets[SE_PRESET_DUSTYROOM] = prop111; |
| 750 |
m_presets[SE_PRESET_CHAPEL] = prop112; |
| 751 |
m_presets[SE_PRESET_SMALLWATERROOM] = prop113; |
| 752 |
} |
| 753 |
|
| 754 |
} //FIFE |