al_load_audio_stream(3)

al_load_audio_stream3

Allegro 5 api

Usage

#include <allegro5/allegro_audio.h>
ALLEGRO_AUDIO_STREAM *al_load_audio_stream(const char *filename,
   size_t buffer_count, unsigned int samples)

Overview

Loads an audio file from disk as it is needed.

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. The stream will contain buffer_count buffers with samples samples.

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.

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.

From allegro 5.2.11.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.