WoW:API PlaySoundFile: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(→‎Incomplete List: removing ad-hominem comment)
Line 46: Line 46:
[[Talk:Shade_of_Aran#Playing_Shade_of_Aran.27s_Emote_Sounds|Shade of Aran Emotes]]
[[Talk:Shade_of_Aran#Playing_Shade_of_Aran.27s_Emote_Sounds|Shade of Aran Emotes]]


== Incomplete list ==
== Soundfile lists ==
A gigantic (over one megabyte) list can be found at [[User talk:Parl2001#Here are your missing Soundfiles (removed) from that page|Parl2001]]'s talk page.
A gigantic (over one megabyte) list can be found at [[User talk:Parl2001#Here are your missing Soundfiles (removed) from that page|Parl2001]]'s talk page.
Updated for Wrath:
http://forums.worldofwarcraft.com/thread.html?topicId=13392160837&sid=1&pageNo=1
== Addons ==
http://www.wowinterface.com/downloads/info9542-BossYells.html
http://www.wowinterface.com/downloads/info10290-EndeavoursBossTalk.html

Revision as of 14:36, 22 March 2009

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

"Power of the Horde"

/script PlaySoundFile("Sound\\Music\\ZoneMusic\\DMF_L70ETC01.mp3") 

"Lament of the Highborne"

/script PlaySoundFile("Sound\\Music\\GlueScreenMusic\\BCCredits_Lament_of_the_Highborne.mp3")

Corrupted Ashbringer "Whispers"

Shade of Aran Emotes

Soundfile lists

A gigantic (over one megabyte) list can be found at Parl2001's talk page.

Updated for Wrath:

http://forums.worldofwarcraft.com/thread.html?topicId=13392160837&sid=1&pageNo=1

Addons

http://www.wowinterface.com/downloads/info9542-BossYells.html

http://www.wowinterface.com/downloads/info10290-EndeavoursBossTalk.html