al_get_audio_...am_length_secs(3alleg5)

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

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:

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 πŸ‘€


<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