audio_stop_music

Stops the indicated background music (OBSOLETE).

Syntax:

audio_stop_music();


Returns: N/A


Description

WARNING! This function has been obsoleted and you should use audio_play_sound and audio_stop_sound instead.

This function will stop any background music that is currently playing. This function only affects the sounds that have been played by the audio_play_music function.


Example:

if !global.Music
   {
   audio_stop_music();
   }
else
   {
   audio_play_music(snd_MusicIntro, true);
   }

The above code checks the global variable "Music" and if it returns false, it will stop all background music that is currently playing, and if it returns true, it will loop the music indexed in the variable "snd_MusicIntro".


Back: Audio
Next: audio_music_is_playing
© Copyright YoYo Games Ltd. 2018 All Rights Reserved