SoundAsset Refactor

This commit is contained in:
marauder2k7 2025-12-12 12:27:33 +00:00
parent 9f29bee45f
commit da40838560
61 changed files with 1333 additions and 1828 deletions

View file

@ -40,7 +40,6 @@ ConsoleDocClass( GuiAudioCtrl,
GuiAudioCtrl::GuiAudioCtrl()
{
INIT_ASSET(Sound);
mTickPeriodMS = 100;
mLastThink = 0;
mCurrTick = 0;
@ -85,7 +84,7 @@ void GuiAudioCtrl::processTick()
{
mCurrTick = 0;
mLastThink = 0;
if (isSoundValid())
if (getSoundAsset().notNull())
{
_update();
}
@ -154,14 +153,11 @@ void GuiAudioCtrl::_update()
if (testCondition() && isAwake())
{
bool useTrackDescriptionOnly = (mUseTrackDescriptionOnly && getSoundProfile());
bool useTrackDescriptionOnly = mUseTrackDescriptionOnly;
if (getSoundProfile())
if (mSoundPlaying == NULL)
{
if (mSoundPlaying == NULL)
{
mSoundPlaying = SFX->createSource(getSoundProfile(), &(SFX->getListener().getTransform()));
}
mSoundPlaying = SFX->createSource(getSoundSFXTrack(), &(SFX->getListener().getTransform()));
}
if ( mSoundPlaying && !mSoundPlaying->isPlaying())