| 2213 | //---------------------------------------------------------------------------- |
| 2214 | |
| 2215 | void 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 | |
| 2234 | void ShapeBase::stopAudio(U32 slot) |
| 2235 | { |
no test coverage detected