/* Music player callback to get the next song path.  */
static const char* get_next_song_path(void *arg_p)
/* Music player callback to get the next song path.  */
static const char* get_next_song_path(void *arg_p)
{
    struct song_t *song_p;
    sem_take(&sem, NULL);
    if (repeat == 0) {
        current_song++;
    }
    song_p = hash_map_get(&song_map, current_song);
    sem_give(&sem, 1);
    if (song_p != NULL) {
        return (song_p->name);
    } else {
        current_song = FIRST_SONG_NUMBER;
        return (NULL);
    }
}