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

Method addSoundSource

Engine/source/T3D/shapeImage.cpp:1470–1482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1468}
1469
1470void ShapeBase::MountedImage::addSoundSource(SFXSource* source)
1471{
1472 if(source != NULL)
1473 {
1474 if(dataBlock->maxConcurrentSounds > 0 && mSoundSources.size() > dataBlock->maxConcurrentSounds)
1475 {
1476 SFX_DELETE(mSoundSources.first());
1477 mSoundSources.pop_front();
1478 }
1479 source->play();
1480 mSoundSources.push_back(source);
1481 }
1482}
1483
1484void ShapeBase::MountedImage::updateSoundSources( const MatrixF &renderTransform )
1485{

Callers 1

setImageStateMethod · 0.80

Calls 5

sizeMethod · 0.45
firstMethod · 0.45
pop_frontMethod · 0.45
playMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected