play_looped_midi(3alleg4)
β¨ NAME β¨
play_looped_midi β starts playing a MIDI file with a user-defined loop position π
okay so this is the Allegro game programming library manual, section 3alleg4, and bestie we are about to make your MIDI loop exactly where you want it to. no cap.
πΈ SYNOPSIS πΈ
#include <allegro.h>
int play_looped_midi(MIDI *midi, int loop_start, int loop_end);
π¦ DESCRIPTION π¦
Starts playing a MIDI file with a user-defined loop position. periodt.
So here's the vibe: when the player reaches the loop end position, or honestly just the end of the file, it winds all the way back to the loop start point. it's giving β¨seamlessβ¨.
Heads up bestie:loop_endmay be-1to only loop at EOF π
Both positions are specified in the same beat number format as the midi_pos variable. iykyk β same units, same energy, no conversions needed π
π RETURN VALUE π
The return value has the same meaning as that of play_midi(): non-zero if an error occurs, zero otherwise.
so likeβ¦ 0 = slay, we're good π«Ά, anything else = something went wrong π
β SEE ALSO β
mwah π that's the whole page, and it's from Allegro, version 4.4.3, filed under play_looped_midi(3alleg4) β go loop something iconic bestie πππ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms