AL_GET_SAMPLE_INSTANCE_TIME(3)
π al_get_sample_instance_time(3) π
okay so bestie, welcome to the Library Functions Manual β¨ β this one's a tiny little icon in the Allegro 5 API and honestly it's giving "short but slay" π . Let me put you on real quick.
πΈ NAME πΈ
al_get_sample_instance_time β the Allegro 5 API girlie who tells you how long a sample instance is π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
float al_get_sample_instance_time(const ALLEGRO_SAMPLE_INSTANCE *spl)
like, that's the whole thing. one function, one float, one const ALLEGRO_SAMPLE_INSTANCE * pointer named spl. no cap, that's it π«Ά
π DESCRIPTION π
okay so here's the tea β β al_get_sample_instance_time hands you back the length of the sample instance in seconds. that's it. that's the vibe π¦
the one tiny little catch? it assumes a playback speed of 1.0 β so like, normal speed, main-character energy, no fast-forwarding or slow-mo shenanigans π. if you're playing it at some other speed... that's a whole different conversation, bestie π
lowkey important: the result is in seconds, not samples, not milliseconds β seconds. type it into your notes app πβ¨
π SEE ALSO π
al_get_sample_instance_length(3)β the sibling function, go say hi π«Ά
and that's the whole page, bestie, you ate that π πβ
with love from the Allegro reference manual β that's the source + the vibe, mwah πππ¦ (and yes, the footer in the original also had al_get_sam...stance_time(3) hanging out on the right side, iconic of it honestly πβ¨π)
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms