midi_seek(3)

NAME
midi_seek

SYNOPSIS
#include <allegro.h>

int midi_seek(int target);

DESCRIPTION
Seeks to the given midi_pos in the current MIDI file. If the target is earlier in the file than the current midi_pos it seeks from the beginning; otherwise it seeks from the current position. Returns zero if successful, non-zero if it hit the end of the file (1 means it stopped playing, 2 means it looped back to the start). If this function stops because it reached EOF, midi_pos will be set to the negative length of the MIDI file.

SEE ALSO
play_midi(3), midi_pos(3)