mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-09 05:34:34 +00:00
SFX API Changes
DSound has since been deprecated and xaudio2 would require us to write our own 3d spatialization and mixer Load devices the same way we load in the gfx end setup sfx provider run sfx devices on startup various fixes around sfx null device added the bitrate and samplerate globals added the hrtf global code is in to use this but not setup yet Adds speed of sound to the sound system SFXAmbience now has a property for speed of sound for different mediums, can also be set directly
This commit is contained in:
parent
54b6c3ec47
commit
d56bf257c7
53 changed files with 1870 additions and 6401 deletions
|
|
@ -131,14 +131,30 @@ void SFXSoundscapeManager::update()
|
|||
SFXAmbience* ambience = mStack[ reverbIndex ]->getAmbience();
|
||||
AssertFatal( ambience->getEnvironment(), "SFXSoundscapeManager::update - Reverb lookup return ambience without reverb!" );
|
||||
|
||||
SFX->setRolloffFactor( ambience->getRolloffFactor() );
|
||||
SFX->setDopplerFactor( ambience->getDopplerFactor() );
|
||||
SFX->setReverb( ambience->getEnvironment()->getReverb() );
|
||||
SFX->setRolloffFactor(ambience->getRolloffFactor());
|
||||
SFX->setDopplerFactor(ambience->getDopplerFactor());
|
||||
SFX->setSpeedOfSound(ambience->getSpeedOfSound());
|
||||
if (ambience->getEnvironment())
|
||||
SFX->setReverb(ambience->getEnvironment()->getReverb());
|
||||
}
|
||||
|
||||
mCurrentReverbIndex = reverbIndex;
|
||||
}
|
||||
|
||||
|
||||
if (mStack[mStack.size() - 1]->mDirtyBits.test(SFXSoundscape::AmbienceDirty))
|
||||
{
|
||||
SFXAmbience* ambience = mStack[mStack.size() - 1]->getAmbience();
|
||||
SFX->setRolloffFactor(ambience->getRolloffFactor());
|
||||
SFX->setDopplerFactor(ambience->getDopplerFactor());
|
||||
SFX->setSpeedOfSound(ambience->getSpeedOfSound());
|
||||
if (ambience->getEnvironment())
|
||||
SFX->setReverb(ambience->getEnvironment()->getReverb());
|
||||
|
||||
mCurrentReverbIndex = mStack.size() - 1;
|
||||
|
||||
mStack[mStack.size() - 1]->mDirtyBits.clear(SFXSoundscape::AmbienceDirty);
|
||||
}
|
||||
|
||||
// Update the active soundscapes.
|
||||
|
||||
for( U32 i = 0; i < mStack.size(); ++ i )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue