al_get_audio_...am_length_secs(3alleg5)
al_get_audio_stream_length_secs π
okay bestie, so this one lives in the Allegro 5 API (that's the 3alleg5 manual, iykyk) and it's literally the "how long is this song tho" function. no cap. π
β¨ NAME β¨
al_get_audio_stream_length_secs β Allegro 5 API, your personal "how many secs is this stream" bestie π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_audio.h>
double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)
π¦ DESCRIPTION π¦
okay so picture this: you hand her a stream, and she gives you back the length of that stream, in seconds, if it's known. that's it. that's the whole vibe. β¨
but babes β and this is the important part β if the length is NOT known, she returns zero. like, just 0. not an error, not a vibe check failure, just a lil zero. so don't be out here treating 0 like it's definitely a zero-length stream, because she said "if known" and she meant it fr fr. π
and here's the tea: currently you can only call this on streams that were created with one of these four icons:
al_load_audio_stream(3alleg5)al_play_audio_stream(3alleg5)al_load_audio_stream_f(3alleg5)al_play_audio_stream_f(3alleg5)
any other stream? not the moment. she's not available for that. periodt. π
note the currently up there β that's the original's word, not mine, so don't come for me if it changes later. π«Ά
π SEE ALSO π
al_get_audio_stream_position_secs(3alleg5)β the "where are we rn" cousin to this one's "how long is the whole thing" energy. they're giving main character and supporting character, honestly. π
<div align="center">
π that's the whole page bestie π
written up in the Allegro reference manual, filed under al_get_audio_...am_length_secs(3alleg5) (yes the title really does get truncated like that, it's giving low battery on the header line π), and she's out here slaying in Allegro 5. go measure some audio. mwah. πβ¨ππ¦πΈπ
π«Ά
</div>
π¦ 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