al_load_audio_stream_f(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– NAME πŸ’–

al_load_audio_stream_f β€” Allegro 5 API, bestie! This is the Library Functions Manual page for the Allegro 5 API, and we're about to make audio stream loading make sense. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro_audio.h>

ALLEGRO_AUDIO_STREAM *al_load_audio_stream_f(ALLEGRO_FILE* fp, const char *ident,
   size_t buffer_count, unsigned int samples)

🌸 DESCRIPTION 🌸

Okay so this function loads an audio file from an ALLEGRO_FILE(3) stream as it is needed. Like, on demand, when the audio actually needs more data. πŸ’…

Unlike regular streams, the one returned by this function need not be fed by the user β€” the library will automatically read more of the file as it is needed. Main character energy, honestly. The stream will contain buffer_count buffers with samples samples each.

The file type is determined by the passed ident parameter, which is a file name extension including the leading dot. Yes, the dot matters, bestie. 🫢

The audio stream will start in the playing state. It should be attached to a voice or mixer to generate any output. See ALLEGRO_AUDIO_STREAM(3) for more details.

Returns the stream on success, NULL on failure. On success the file should be considered owned by the audio stream, and will be closed when the audio stream is destroyed. On failure the file will be closed.

⚠️ Note: the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. No cap, you gotta bring your own codec situation. 😭

⭐ SEE ALSO ⭐


That's the whole page, bestie πŸ’œ β€” sourced from the Allegro reference manual footer situation for al_load_audio_stream_f(3), and ngl there's no extra version or date printed beyond that footer. Slay. πŸ’…βœ¨

πŸ“¦ 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