al_set_voice_playing(3alleg5)

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

✨ NAME ✨

al_set_voice_playing β€” the Allegro 5 API page that lets you flip a voice on or off, bestie πŸ’– (this one lives in the 3alleg5 section of the Allegro reference manual, iykyk)


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_audio.h>

bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val)

πŸŽ€ DESCRIPTION πŸŽ€

Okay so literally what this does is change whether a voice is playing or not. That's the whole vibe. You hand it a voice, you hand it a bool, and it does the thing. πŸ’…

But β€” and this is the important part, no cap β€” this can only work if the voice has a non-streaming object attached to it. Like, a sample instance. That kind of thing. Streaming objects? Not it, bestie. πŸ™ˆ

On success, the voice's current sample position gets reset. So it's giving fresh-start energy. πŸ¦‹

It returns true on success, and false on failure. That's it, that's the return value, periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯


And that's the whole page, babe! This lil' rewrite came straight out of the Allegro reference manual β€” you can find al_set_voice_playing chillin' in the 3alleg5 section. Slay, go make some sounds. πŸŽ§πŸ’œ

πŸ“¦ where this page comes from