---
name: "al_init_acodec_addon"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_init_acodec_addon/3alleg5"
---

# al\_init\_acodec\_addon(3alleg5)

Allegro 5 API

## NAME

al\_init\_acodec\_addon - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_acodec.h>
  bool al_init_acodec_addon(void)
  ```

## DESCRIPTION

This function registers all the known audio file type handlers for al\_load\_sample(3alleg5), al\_save\_sample(3alleg5), al\_load\_audio\_stream(3alleg5), etc.

Depending on what libraries are available, the full set of recognised extensions is: .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc.

*Limitations:*

- •

  Saving is only supported for wav files.

- •

  The wav file loader currently only supports 8/16 bit little endian PCM files. 16 bits are used when saving wav files. Use flac files if more precision is required.

- •

  Module files (.it, .mod, .s3m, .xm) are often composed with streaming in mind, and sometimes cannot be easily rendered into a finite length sample. Therefore they cannot be loaded with al\_load\_sample(3alleg5)/al\_load\_sample\_f(3alleg5) and must be streamed with al\_load\_audio\_stream(3alleg5) or al\_load\_audio\_stream\_f(3alleg5).

- •

  .voc file streaming is unimplemented.

Return true on success.
