Difference between revisions of "Function IsSongPlaying()"

From Uzebox Wiki
Jump to: navigation, search
(Created page with "{{Function |prototype = bool IsSongPlaying(); |description = Indicate the playing state of the music engine. |parameters = |returns = true if song is currently playing, fa...")
 
Line 9: Line 9:
 
|deprecated  =  
 
|deprecated  =  
 
}}
 
}}
 +
 +
StartSong(song_ending);
 +
while(1){
 +
  if(!IsSongPlaying()){
 +
  Print(10,10,PSTR("Song has ended!"));
 +
  break;
 +
  }
 +
}

Revision as of 01:20, 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 never return false.

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