---
name: "al_play_audio_stream_f"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_play_audio_stream_f"
---

# al\_play\_audio\_stream\_f(3)

Allegro 5 API

## NAME

al\_play\_audio\_stream\_f - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  ALLEGRO_AUDIO_STREAM *al_play_audio_stream_f(ALLEGRO_FILE *fp, const char *ident)
  ```

## DESCRIPTION

Loads and plays an audio file from [ALLEGRO\_FILE(3)](/ALLEGRO_FILE/3.md) stream, streaming it is needed. This API can only play one audio stream at a time. This requires a default mixer to be set, which is typically done via [al\_reserve\_samples(3)](/al_reserve_samples/3.md), but can also be done via [al\_set\_default\_mixer(3)](/al_set_default_mixer/3.md).

The file type is determined by the passed \`ident' parameter, which is a file name extension including the leading dot.

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. 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.

## SEE ALSO

[al\_play\_audio\_stream(3)](/al_play_audio_stream/3.md), [al\_load\_audio\_stream\_f(3)](/al_load_audio_stream_f/3.md)

## SINCE

5\.2.8

*\[Unstable API\]:* New API.
