Change GuiProfile to use Sound Asset

-Added SoundAssetInspector to bypass circular issue
-Added SoundAsset to GuiTypes
This commit is contained in:
marauder2k7 2022-08-29 23:40:51 +01:00
parent ebbf0947b3
commit 5d85664b40
10 changed files with 91 additions and 106 deletions

View file

@ -48,6 +48,8 @@
#include "platform/profiler.h"
#include "sfx/sfxTypes.h"
#include "SoundAssetInspectors.h"
//-----------------------------------------------------------------------------
IMPLEMENT_CONOBJECT(SoundAsset);
@ -225,6 +227,8 @@ bool SoundAsset::loadSound()
}
else
{// = new SFXProfile(mProfileDesc, mSoundFile, mPreload);
if (mProfileDesc.mSourceGroup == NULL)
mProfileDesc.mSourceGroup = dynamic_cast<SFXSource*>(Sim::findObject("AudioChannelMaster"));
mSFXProfile.setDescription(&mProfileDesc);
mSFXProfile.setSoundFileName(mSoundPath);
mSFXProfile.setPreload(mPreload);