al_seek_audio_stream_secs(3alleg5)

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

✨ al_seek_audio_stream_secs ✨

okay bestie, welcome to the Allegro 5 API corner of the man pages (yes that's the 3alleg5 manual, we're fancy like that πŸ’…). this one's short and sweet but it's SO useful, trust.


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_audio.h>

bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double time)

like look at that signature. clean. iconic. no notes. 🫢


πŸ’– DESCRIPTION πŸ’–

so what does it do? it sets the streaming file playing position to time. that's it, that's the whole vibe β€” you're basically dragging the little scrubber bar on your audio, but in code. ⏩

it returns true on success. returns false... well, you know. πŸ™ˆ

⚠️ real talk though: right now this can only be called on streams that were created with one of these four: - al_load_audio_stream(3alleg5) - al_play_audio_stream(3alleg5) - al_load_audio_stream_f(3alleg5) - al_play_audio_stream_f(3alleg5) call it on anything else and it's giving not it. so make sure your stream came from one of those before you go seeking, bestie. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, no cap. this was the Allegro reference manual entry for al_seek_audio_stream_secs in the 3alleg5 manual β€” go forth and seek responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from