WoW API < PlaySoundFile

PlaySoundFile(SoundFile)

Play the specified sound file. The file will be played once. Unlike PlayMusic, you cannot stop the file from playing once it starts.


Arguments


(SoundFile)
SoundFile
String - The path and name of the sound file you'd like to play. This has been successfully tested with .wav and .mp3 files. Note that the path is relative to the World of Warcraft installation directory.

Example: Playing a sound file from within an AddOn's directory
PlaySoundFile("Interface\\AddOns\\MyAddOn\\mysound.wav")

or

PlaySoundFile("Interface\\AddOns\\MyAddOn\\mysound.mp3")

Details

This has been successfully tested for playing sounds inside your AddOn's directory, so you don't have to worry about putting your sound files outside your AddOn directory.

However - it does appear that the sound file must be present in the AddOn directory BEFORE loading the game. A /console reloadui will not refresh the sound files.

There does not appear to be a bad error if the file is missing - it just won't play. There is a return status, which is 1 if the sound was OK and nil if it couldn't be found.

This API call was broken in patch 1.11 and was fixed in patch 1.11.2.

Some Popular Sounds

/script PlaySoundFile("Sound\\Music\\ZoneMusic\\DMF_L70ETC01.mp3") 
/script PlaySoundFile("Sound\\Music\\GlueScreenMusic\\BCCredits_Lament_of_the_Highborne.mp3")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_01.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_02.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_03.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_04.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_05.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_06.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_07.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_08.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_09.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_10.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_11.wav")
/script PlaySoundFile("Sound\\Creature\\Ashbringer\\ASH_SPEAK_12.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranAggro01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranAggro02.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranAggro03.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranArcane01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranArcane02.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranDies01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranFire01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranFire02.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranFrost01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranFrost02.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranGameOver01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranOutOfMana01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranSeeStaff01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranSlay01.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranSlay02.wav")
/script PlaySoundFile("Sound\\Creature\\ShadeOfAran\\AranSummonElem01.wav")

See also

PlaySoundFile macro lists

A gigantic (over one megabyte) list can be found at Parl2001's talk page. This list was extracted from patch 2.4, so some may have changed since then. Eventually these lists will hopefully get updated with Template:Wotlk-inline sounds.

This list is slowly being copied into separate pages:

External links

Updated for Wrath of the Lich King

NOTE: WoWWiki and Wikia are not responsible for the contents of the files below, so you use them at your own risk.

ZIP file downloads of list
http://www.2shared.com/file/4485501/325410ac/Wow_Script_Sounds__including_wrath_.html
http://www.megaupload.com/?d=TZSCO14Y
http://www.thevarden.net/files/Wow%20Script%20Sounds%20(including%20wrath).zip
AddOns