---
name: "al_create_mixer"
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_create_mixer/3alleg5"
---

# al\_create\_mixer(3alleg5)

Allegro 5 API

## NAME

al\_create\_mixer - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  ALLEGRO_MIXER *al_create_mixer(unsigned int freq,
     ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)
  ```

## DESCRIPTION

Creates a mixer to attach sample instances, audio streams, or other mixers to. It will mix into a buffer at the requested frequency (in Hz) and channel count.

The only supported audio depths are ALLEGRO\_AUDIO\_DEPTH\_FLOAT32 and ALLEGRO\_AUDIO\_DEPTH\_INT16 (not yet complete).

To actually produce any output, the mixer will have to be attached to a voice using al\_attach\_mixer\_to\_voice(3alleg5).

Reasonable default arguments are:

-

  ```
  al_create_mixer(44100, ALLEGRO_AUDIO_DEPTH_FLOAT32, ALLEGRO_CHANNEL_CONF_2)
  ```

Returns true on success, false on error.

## SEE ALSO

al\_destroy\_mixer(3alleg5), ALLEGRO\_AUDIO\_DEPTH(3alleg5), ALLEGRO\_CHANNEL\_CONF(3alleg5)
