al_set_default_voice(3alleg5)

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

✨ al_set_default_voice(3alleg5) ✨

okay bestie, so this one lives in the Allegro reference manual (yes, the Allegro 5 API, the whole audio situation) and it's genuinely such a little power move of a function. let's get into it πŸ’–


🌸 NAME 🌸

al_set_default_voice β€” Allegro 5 API. that's it, that's the name, she's simple and she knows it πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro_audio.h>

void al_set_default_voice(ALLEGRO_VOICE *voice)

no return value, no drama, just vibes and a pointer πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie: you can call this before you call al_restore_default_mixer, and it's how you tell Allegro which voice it should be using. like, "hey, use this one, mwah πŸ’‹".

but wait β€” plot twist β€” any previous voice will be destroyed. not paused, not stored in a lil box for later, destroyed. gone. so don't come crying to me if you wanted it back 😭

and get this, you can also pass NULL to destroy the current default voice. yep, NULL is your "nvm, we're done here" button. iconic behaviour honestly πŸ‘‘


⭐ SINCE ⭐

5.1.13 β€” so it's been around for a minute, this isn't some new-new thing 🫢


🌈 SEE ALSO 🌈


and that's the whole page, no notes, you ate it fr fr. this was al_set_default_voice(3alleg5) from the Allegro reference manual (Allegro 5, version vibes as noted above) β€” mwah, go set some voices, ily, bye πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from