mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-05-28 16:46:35 +00:00
Add reverb
Adds reverb functionality to sound system TODO: Make a proper sfxMixer api that will route voices to channels that have the effects slots added to them. this is just a place holder for a more complete implementation
This commit is contained in:
parent
15a7b8cce0
commit
acda0354d6
11 changed files with 830 additions and 1002 deletions
|
|
@ -261,11 +261,6 @@ bool SFXSound::_allocVoice( SFXDevice* device )
|
|||
_setCone( mConeInsideAngle, mConeOutsideAngle, mConeOutsideVolume );
|
||||
}
|
||||
|
||||
// Set reverb, if enabled.
|
||||
|
||||
if( mDescription->mUseReverb )
|
||||
mVoice->setReverb( mDescription->mReverb );
|
||||
|
||||
// Update the duration... it shouldn't have changed, but
|
||||
// its probably better that we're accurate if it did.
|
||||
mDuration = mBuffer->getDuration();
|
||||
|
|
@ -395,8 +390,10 @@ void SFXSound::_play()
|
|||
{
|
||||
Parent::_play();
|
||||
|
||||
if( mVoice )
|
||||
mVoice->play( isLooping() );
|
||||
if (mVoice)
|
||||
{
|
||||
mVoice->play(isLooping());
|
||||
}
|
||||
else
|
||||
{
|
||||
// To ensure the fastest possible reaction
|
||||
|
|
@ -447,6 +444,11 @@ void SFXSound::_updateStatus()
|
|||
|
||||
if( mVoice )
|
||||
{
|
||||
|
||||
// properties can change while a voice is playing, respect that.
|
||||
if (getSourceGroup())
|
||||
mVoice->setReverb(getSourceGroup()->getDescription()->mUseReverb);
|
||||
|
||||
SFXStatus voiceStatus = mVoice->getStatus();
|
||||
|
||||
// Filter out SFXStatusBlocked.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue