mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1564 from Azaezel/alpha41/playAudioFixes
playaudio related fixes
This commit is contained in:
commit
93612aef80
|
|
@ -167,7 +167,7 @@ SoundAsset::SoundAsset()
|
|||
mProfileDesc.mScatterDistance = Point3F(0.f, 0.f, 0.f);
|
||||
mProfileDesc.mPriority = 1.0f;
|
||||
mProfileDesc.mSourceGroup = NULL;
|
||||
|
||||
mProfileDesc.mFadeInEase = EaseF();
|
||||
mIsPlaylist = false;
|
||||
|
||||
mPlaylist.mNumSlotsToPlay = SFXPlayList::SFXPlaylistSettings::NUM_SLOTS;
|
||||
|
|
|
|||
|
|
@ -2347,14 +2347,12 @@ void ShapeBase::updateAudioState(SoundThread& st)
|
|||
if ( isGhost() )
|
||||
{
|
||||
// if asset is valid, play
|
||||
if (st.asset->isAssetValid() )
|
||||
if (st.asset->load() == AssetBase::Ok)
|
||||
{
|
||||
if (st.asset->load() == AssetBase::Ok)
|
||||
{
|
||||
st.sound = SFX->createSource(st.asset->getSFXTrack(), &getTransform());
|
||||
if (st.sound)
|
||||
st.sound->play();
|
||||
}
|
||||
SFXTrack* trk = st.asset->getSFXTrack();
|
||||
st.sound = SFX->createSource(trk, &getTransform());
|
||||
if (st.sound)
|
||||
st.sound->play();
|
||||
}
|
||||
else
|
||||
st.play = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue