midi_loop_start(3)
π midi_loop_start(3) π
ok so bestie, we're in the Allegro manual today and this is a page about two little global variables that live in the Allegro game programming library. They're called midi_loop_start and midi_loop_end, and together they're giving "loop start and end points" energy. no cap.
β¨ NAME β¨
midi_loop_start, midi_loop_end β the loop start and end points, set by play_looped_midi(). Allegro game programming library. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
extern long midi_loop_start;
extern long midi_loop_end;
like, that's it. two extern longs. they're just out there, existing, in the global namespace, living their best life. π
π¦ DESCRIPTION π¦
ok so these two are the loop start and end points, and they get set by the play_looped_midi() function. that's the whole vibe. π
here's the tea though β you can safely alter them while the music is playing. yes bestie, live-editing, main character energy, we love that for you. BUT (and this is a big but) you gotta be sure they're always set to sensible values, meaning:
start < end
fr fr. keep it sensible. the moment you don't, that's not it. π
β οΈ and if you're changing both of them at the same time? make sure you alter them in the right order, because a MIDI interrupt could literally happen in between your two writes. not me getting jumpscared by an interrupt mid-assignment π
also iconic: setting these values to -1 represents the start and end of the file respectively. so -1 = "beginning of file" for the start, and -1 = "end of file" for the end. yes, same number, different meaning, depending on which one you're writing. she contains multitudes. β¨
π SEE ALSO π
play_looped_midi(3)β the function that sets these bad boys in the first place π«Ά
and that's the whole page, bestie! this absolute banger of a manual page came to you from Allegro, version 4.4.3. go forth and loop responsibly πβ¨ππ¦πΈπ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms