Plays an audio file at a given path. For a shorter way to specify one of WoW's built-in UI sound effects, see PlaySound().

WoW supports custom sound files using MP3 and Ogg audio formats.


See also Sound functions.

Signature:

PlaySoundFile("soundFile", "soundChannel")

Arguments:

  • soundFile - A path to the sound file to be played (string)
  • soundChannel - The sound volume slider setting the sound should use. One of SFX, Music, Ambience or Master. (string)

Examples:

-- play one of WoW's built-in sound files
PlaySoundFile("Sound\\Spells\\AbolishMagic.wav")
-- play a sound file from an addon and ignore any sound setting except the master volume slider
PlaySoundFile("Interface\\AddOns\\MyAddOn\\MySound.mp3", "Master")