Difference between revisions of "Function IsSongPlaying()"

From Uzebox Wiki
Jump to: navigation, search
Line 5: Line 5:
 
|returns    = true if song is currently playing, false otherwise.
 
|returns    = true if song is currently playing, false otherwise.
 
|video modes = All
 
|video modes = All
|notes      = If the song contains a loop, this function will never return false.
+
|notes      = If the song contains a loop, this function will always return true.
 
|see also    =  
 
|see also    =  
 
|deprecated  =  
 
|deprecated  =  

Revision as of 01:23, 22 April 2016

Prototype

bool IsSongPlaying();

Description

Indicate the playing state of the music engine.

Parameters

None

Returns

true if song is currently playing, false otherwise.

Video Modes

All

Since

V1

Notes

If the song contains a loop, this function will always return true.

StartSong(song_ending);
while(1){
 if(!IsSongPlaying()){
  Print(10,10,PSTR("Song has ended!"));
  break;
 }
}