Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
({{wowapi}}, formatting)
m (looping depends on cvar, leaving it out.)
Line 13: Line 13:
   
 
==Notes==
 
==Notes==
*You cannot pause the playback.
+
*You cannot pause the playback, but you can stop it with [[API_StopMusic|StopMusic()]].
 
*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.
*The file you specified will loop until you call [[API StopMusic|StopMusic]].
 
 
*This function can be used with website url's such as those used by Internet Radio Stations.
 
*This function can be used with website url's such as those used by Internet Radio Stations.
 
*(Not 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).
 
*(Not 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).

Revision as of 21:22, 23 December 2006

Plays the given mp3 file.

PlayMusic(soundFile);

Parameters

Arguments

soundFile
String - path to a MP3 file, relative to your World of Warcraft\Data folder.

Example

PlayMusic("Sound\\Music\\GlueScreenMusic\\wow_main_theme.mp3");

Result

Current music fades out, login music plays.

Notes

  • You cannot pause the playback, but you can stop it with StopMusic().
  • If any of the built-in music is playing when you call this function (e.g. Stormwind background music), it will fade out.
  • This function can be used with website url's such as those used by Internet Radio Stations.
  • (Not 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).