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_end may be -1 to 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 πŸŽ€πŸŒˆπŸ’–