---
name: "al_set_default_mixer"
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_set_default_mixer"
---

# al\_set\_default\_mixer(3)

Allegro 5 API

## NAME

al\_set\_default\_mixer - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  bool al_set_default_mixer(ALLEGRO_MIXER *mixer)
  ```

## DESCRIPTION

Sets the default mixer. All samples started with [al\_play\_sample(3)](/al_play_sample/3.md) will be stopped and all sample instances returned by [al\_lock\_sample\_id(3)](/al_lock_sample_id/3.md) will be invalidated. If you are using your own mixer, this should be called before [al\_reserve\_samples(3)](/al_reserve_samples/3.md).

Returns true on success, false on error.

## SEE ALSO

[al\_reserve\_samples(3)](/al_reserve_samples/3.md), [al\_play\_sample(3)](/al_play_sample/3.md), [al\_get\_default\_mixer(3)](/al_get_default_mixer/3.md), [al\_restore\_default\_mixer(3)](/al_restore_default_mixer/3.md)
