mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-15 20:53:50 +00:00
SoundAsset Refactor
This commit is contained in:
parent
9f29bee45f
commit
da40838560
61 changed files with 1333 additions and 1828 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue