Plays an audio file as background music. Any other background music that is currently playing will be faded out as the new music begins; if the Sound_ZoneMusicNoDelay is set, music will loop continuously until StopMusic() is called.

WoW supports WAV, MP3 and Ogg audio formats.


See also Sound functions.

Signature:

PlayMusic("musicfile")

Arguments:

  • musicfile - Path to a music file (string)

Examples:

-- play one of WoW's built-in music files
PlayMusic("Sound\\Music\\GlueScreenMusic\\wow_main_theme.mp3")
-- play a music file from an addon
PlayMusic("Interface\\AddOns\\MyAddOn\\MyMusic.mp3")