Skip to content

Commit

Permalink
gba: player: Add gbt_is_playing()
Browse files Browse the repository at this point in the history
This can be used to see if a song is playing or not.
  • Loading branch information
AntonioND committed May 19, 2022
1 parent 06d04c3 commit d613c3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gba/gbt_player/gbt_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ void gbt_volume(unsigned int left, unsigned int right)
}
}

int gbt_is_playing(void)
{
return gbt.playing;
}

void gbt_pause(int play)
{
gbt.playing = play;
Expand Down
3 changes: 3 additions & 0 deletions gba/gbt_player/gbt_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ void gbt_stop(void);
// Updates the player, must be called each VBL.
void gbt_update(void);

// Returns 1 if a song is playing, 0 otherwise.
int gbt_is_playing(void);

// Song control
// ------------

Expand Down

0 comments on commit d613c3a

Please sign in to comment.