al_set_audio_stream_speed(3alleg5)

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

πŸ’– al_set_audio_stream_speed πŸ’–

okay bestie, so this is a page from the Allegro 5 API manual β€” yes, the Allegro 5, the one that does all the graphics and audio and game-dev slay πŸ’…. And this particular little function? It's the one that makes your audio stream go fast or slow. Vibe control for your sound. Obsessed.


✨ NAME ✨

al_set_audio_stream_speed β€” Allegro 5 API πŸŽ€


✨ SYNOPSIS ✨

#include <allegro5/allegro_audio.h>

bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, float val)

✨ DESCRIPTION ✨

So what it does is: it sets the relative playback speed of the stream. And 1.0 means normal speed β€” like, the regular unbothered speed, the default, the no-notes speed. Anything else is you tweaking the vibe ✨.

It returns true on success and false on failure, bestie. That's the whole contract, no cap.

🚨 but lowkey important: it will fail if the audio stream is attached directly to a voice. So if you've got your stream glued straight onto a voice, this function is just gonna look at you and return false. Not its fault. That's just the rules πŸ™ˆ.

✨ SEE ALSO ✨


Allegro reference manual, al_set_audio_stream_speed(3alleg5) β€” that's the sign-off bestie, that's the source and the page name and honestly? iconic. go forth and speed up your streams πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from