mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-05-31 18:16:37 +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
1c6409a485
commit
974f217b96
53 changed files with 1885 additions and 6409 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