![]() |
![]()
| ![]() |
![]()
NAMEget_midi_length - Determines the total playing time of a midi, in seconds. Allegro game programming library. SYNOPSIS#include <allegro.h> int get_midi_length(MIDI *midi); DESCRIPTIONThis function will simulate playing the given MIDI, from start to end, to determine how long it takes to play. After calling this function, midi_pos will contain the negative number of beats, and midi_time the length of the midi, in seconds. Note that any currently playing midi is stopped when you call this function. Usually you would call it before play_midi, to get the length of the midi to be played, like in this example:
RETURN VALUEReturns the value of midi_time, the length of the midi. SEE ALSOload_midi(3), midi_time(3), midi_pos(3), exmidi(3)
|