ALLEGRO_PLAYMODE(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ALLEGRO_PLAYMODE πŸ’–

okay bestie, welcome to the Allegro 5 API corner of the manual, this is ALLEGRO_PLAYMODE(3alleg5) and it's literally just an enum that tells your audio how to behave. no cap. πŸŽ€


✨ SYNOPSIS ✨

#include <allegro5/allegro_audio.h>

enum ALLEGRO_PLAYMODE

🌸 DESCRIPTION 🌸

so this is the sample and stream playback mode enum. it's giving "how many times do you want this audio to go", and the answer is one of these four icons πŸ‘‘

  • ALLEGRO_PLAYMODE_ONCE β€” the sample/stream gets played from start to finish, and then it stops. that's it. one and done. 🫢
  • ALLEGRO_PLAYMODE_LOOP β€” the sample/stream plays from start to finish (or between the two loop points, if you set those). when it hits the end, it restarts from the beginning. forever. iconic behaviour, no skips. πŸ”βœ¨
  • ALLEGRO_PLAYMODE_LOOP_ONCE β€” literally just like ALLEGRO_PLAYMODE_ONCE, except it respects the loop end point. so it's a once, but a polite once that knows where the finish line is. πŸ’…
  • ALLEGRO_PLAYMODE_BIDIR β€” the sample plays from start to finish (or between the two loop points). when it reaches the end, it reverses the playback direction and plays until it reaches the beginning, and then it flips the direction back to normal. it's giving ping-pong, it's giving yoyo, it's giving main character energy. 🌈
⚠️ okay important note: ALLEGRO_PLAYMODE_BIDIR is rarely supported for streams. so like, samples? yes. streams? don't count on it, bestie. 😭

and that's the whole vibe check. this page came from the Allegro reference manual, it's the 3alleg5 manual for ALLEGRO_PLAYMODE (the Allegro 5 API, duh πŸ’œ), and the date's whatever's on your local copy of the docs β€” check the header if you need the exact stamp, i'm not your calendar bestie. πŸ¦‹βœ¨

πŸ“¦ where this page comes from