API PlaySoundFile

Plays the specified audio file once. willPlay, soundHandle = PlaySoundFile("soundFile" or soundFileID [, "channel"])

Arguments

 * soundFile : string - The path and name of the sound file you'd like to play, relative to the WoW directory;
 * Must be a path to a soundfile in an addon. The file must exist prior to logging in to WoW.
 * Both .ogg and .mp3 formats are accepted.


 * or soundFileID : number - FileDataID of the sound.


 * channel : string (optional) - The sound volume slider setting the sound should use, one of:,   (Sound),  ,  ,  . Individual channels (except "Master") have user-configurable volume settings and may be muted, preventing playback. Defaults to   if not specified.



Returns

 * willPlay : boolean - true if the sound will be played, nil otherwise (prevented by a muted sound channel, for instance).
 * soundHandle : number - identifier for the queued playback.

Examples
Plays a sound file included with your addon and ignores any sound setting except the master volume slider: PlaySoundFile("Interface\\AddOns\\MyAddOn\\mysound.ogg", "Master")
 * Both slash  or escaped backslashes   can be used as file separators.

Plays the level up sound: -- by file path (dropped in 8.2.0) PlaySoundFile("Sound/Spells/LevelUp.ogg")

-- by FileDataID 569593 (added support in 8.2.0) PlaySoundFile(569593)

-- by SoundKitID 888 (SoundKitName LEVELUP) (888)

Finding Sound IDs
File Data IDs Sound Kit Names/IDs
 * By file name/path, e.g. Spells/LevelUp,type:ogg in wow.tools
 * By SoundKitID, e.g. skit:888 in wow.tools
 * By sound kit name with https://wow.tools/files/sounds.php
 * From the sounds tab for an NPC, for example https://www.wowhead.com/npc=154304/waveblade-shaman#sounds
 * By sound kit name with https://www.wowhead.com/sounds and SoundKitName.db2
 * IDs used by the FrameXML are defined in the SOUNDKIT table
 * The full list of IDs can be found in SoundKitEntry.db2