Skip to content

@modoki/engine / index / stopEntityAudio

Function: stopEntityAudio()

stopEntityAudio(world, entity): void

Hard-stop one entity's audio (tear the handle down, distinct from pause). Backs the built-in audio.stop action. Safe to call for an entity with no live handle.

Does NOT clear the autoplay guard: an in-Play Stop must STICK, but clearing the guard would let autoplay re-fire next frame and restart the source. (The guard is reset only when the game leaves Play or the entity is removed, so autoplay fires again on the next Play / re-spawn, not after a manual stop.)

Parameters

world

World

entity

Entity

Returns

void

Built with Modoki.