1play_midi(3) Allegro manual play_midi(3)
2
3
4
6 play_midi - Starts playing the specified MIDI file. Allegro game pro‐
7 gramming library.
8
10 #include <allegro.h>
11
12
13 int play_midi(MIDI *midi, int loop);
14
16 Starts playing the specified MIDI file, first stopping whatever music
17 was previously playing. If the loop flag is set to non-zero, the data
18 will be repeated until replaced with something else, otherwise it will
19 stop at the end of the file. Passing a NULL pointer will stop whatever
20 music is currently playing.
21
23 Returns non-zero if an error occurs (this may happen if a patch-caching
24 wavetable driver is unable to load the required samples, or at least it
25 might in the future when somebody writes some patch-caching wavetable
26 drivers :-)
27
28
30 install_sound(3), load_midi(3), play_looped_midi(3), stop_midi(3),
31 midi_pause(3), midi_seek(3), midi_pos(3), midi_time(3), midi_msg_call‐
32 back(3), exmidi(3)
33
34
35
36Allegro version 4.4.2 play_midi(3)