Stop a playing sound. Stops a sound that has been started with either PlaySound or PlaySoundFile using the handle given as the second return by both functions.


See also Sound functions.

Signature:

StopSound(soundHandle)

Arguments:

  • soundHandle - The handle for the sound that is to be stopped. (number)

Examples:

-- Play a sound and get its handle
local willPlay, soundHandle = PlaySoundFile("Sound\\Spells\\AbolishMagic.wav")
-- Some time later, stop it using the handle
StopSound(soundHandle)