al_seek_audio_stream_secs(3alleg5)
β¨ 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 π¦
al_get_audio_stream_position_secs(3alleg5)β for when you wanna know where you're at πal_get_audio_stream_length_secs(3alleg5)β for when you wanna know how much song is left π
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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms