WoW:API PlayMusic: Difference between revisions
Jump to navigation
Jump to search
(You can play MP3 after reload UI, checked it yesterday) |
(→Notes) |
||
Line 19: | Line 19: | ||
*If any of the built-in music is playing when you call this function (e.g. Stormwind background music), it will fade out. | *If any of the built-in music is playing when you call this function (e.g. Stormwind background music), it will fade out. | ||
*(Verified): since World of Warcraft uses the FMOD sound engine, it is very likely that other file formats than mp3 are supported. For example OggVorbis (.ogg). | *(Verified): since World of Warcraft uses the FMOD sound engine, it is very likely that other file formats than mp3 are supported. For example OggVorbis (.ogg). | ||
*The playback loops until it is stopped with [[API_StopMusic|StopMusic()]]. |
Revision as of 00:28, 23 June 2008
Plays the given mp3 file.
PlayMusic(soundFile);
Parameters
Arguments
- soundFile
- String - path to a MP3 file. You can refer to both files in WoW's MPQs, or your own music files in your addon's directory.
Example
PlayMusic("Sound\\Music\\GlueScreenMusic\\wow_main_theme.mp3"); PlayMusic("Interface\\AddOns\\Foo\\bar.mp3");
Result
Current music fades out, login or custom music plays.
Notes
- You cannot pause the playback, but you can stop it with StopMusic().
- You cannot use this function to play custom MP3 files located outside an addon's directory.
- To play MP3 files that were added to an addon's directory after WoW has been launched you will first have to reload the UI.
- If any of the built-in music is playing when you call this function (e.g. Stormwind background music), it will fade out.
- (Verified): since World of Warcraft uses the FMOD sound engine, it is very likely that other file formats than mp3 are supported. For example OggVorbis (.ogg).
- The playback loops until it is stopped with StopMusic().