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 Ogg or MP3 audio format. MP3 support was dropped in patch 6.0.2, but added again in patch 6.0.3


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.ogg", "Master")