DOKK / manpages / debian 12 / allegro5-doc / al_play_audio_stream.3alleg5.en
al_play_audio_stream(3alleg5) al_play_audio_stream(3alleg5)

al_play_audio_stream - Allegro 5 API

#include <allegro5/allegro_audio.h>
ALLEGRO_AUDIO_STREAM *al_play_audio_stream(const char *filename)
    

Loads and plays an audio file from disk as it is needed. This API can only play one audio stream at a time.

Returns the stream on success, NULL on failure. You must not destroy the returned stream, it will be automatically destroyed when the addon is shut down.

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.

al_play_audio_stream_f(3alleg5), al_load_audio_stream(3alleg5)

5.2.8

[Unstable API]: New API.

Allegro reference manual