midi_seek(3)
β¨ midi_seek(3) β¨
okay bestie, welcome to the Allegro manual β this one's midi_seek, and it's giving skip-to-my-lou energy for your MIDI files π
πΈ NAME πΈ
midi_seek β seeks to the given midi_pos in the current MIDI file. Part of the Allegro game programming library, iykyk π
π¦ SYNOPSIS π¦
#include <allegro.h>
int midi_seek(int target);
β DESCRIPTION β
so basically? this function seeks to the given midi_pos in the current MIDI file. that's the whole vibe. β¨
but here's the lil detail that matters: if the target is earlier in the file than the current midi_pos, it seeks from the beginning π. otherwise (target is later, or wherever), it seeks from the current position. no cap, that's literally how it works β no rewinding from the middle, she goes all the way back to the top.
π RETURN VALUE π
okay so the return value is doing a lot of talking here, so let's break it down fr fr:
0β slay! it successfully seeked to the requested position. we love to see it π«Ά1β it stopped playing, andmidi_posis set to the negative length of the MIDI file. and bestie, that's actually a hack β you can use this function to figure out the length of a MIDI file π iconic behaviour honestly.2β the MIDI file looped back to the start π. it went around again, main character energy.
π SEE ALSO π
and that's the whole page, bestie!! π this lil cutie is from Allegro version 4.4.3 β go forth and seek responsibly, mwah ππ β¨π¦πΈ
π¦ 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