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:
marauder2k7 2026-03-13 18:55:55 +00:00
parent 15a7b8cce0
commit acda0354d6
11 changed files with 830 additions and 1002 deletions

View file

@ -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.