midi_seek - Man Page

Seeks to the given midi_pos in the current MIDI file. Allegro game programming library.

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.

Return Value

Returns zero if it could successfully seek to the requested position. Otherwise, a return value of 1 means it stopped playing, and midi_pos is set to the negative length of the MIDI file (so you can use this function to determine the length of a MIDI file). A return value of 2 means the MIDI file looped back to the start.

See Also

play_midi(3), midi_pos(3)

Referenced By

midi_pause(3), play_midi(3).

version 4.4.3 Allegro manual