MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / playAudio

Method playAudio

Engine/source/T3D/shapeBase.cpp:2215–2232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2213//----------------------------------------------------------------------------
2214
2215void ShapeBase::playAudio(U32 slot, StringTableEntry assetId)
2216{
2217 AssertFatal( slot < MaxSoundThreads, "ShapeBase::playAudio() bad slot index" );
2218 if (AssetDatabase.isDeclaredAsset(assetId))
2219 {
2220 AssetPtr<SoundAsset> tempSoundAsset;
2221 tempSoundAsset = assetId;
2222
2223 SoundThread& st = mSoundThread[slot];
2224 if (tempSoundAsset && (!st.play || st.asset != tempSoundAsset))
2225 {
2226 setMaskBits(SoundMaskN << slot);
2227 st.play = true;
2228 st.asset = tempSoundAsset;
2229 updateAudioState(st);
2230 }
2231 }
2232}
2233
2234void ShapeBase::stopAudio(U32 slot)
2235{

Callers 1

shapeBase.cppFile · 0.80

Calls 1

isDeclaredAssetMethod · 0.80

Tested by

no test coverage detected