---
name: "al_unlock_sample_id"
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_unlock_sample_id"
---

# al\_unlock\_sample\_id(3)

Allegro 5 API

## NAME

al\_unlock\_sample\_id - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  void al_unlock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
  ```

## DESCRIPTION

Unlocks a [ALLEGRO\_SAMPLE\_ID(3)](/ALLEGRO_SAMPLE_ID/3.md), allowing future calls to [al\_play\_sample(3)](/al_play_sample/3.md) to reuse it if possible. Note that after the id is unlocked, the [ALLEGRO\_SAMPLE\_INSTANCE(3)](/ALLEGRO_SAMPLE_INSTANCE/3.md) that was previously returned by [al\_lock\_sample\_id(3)](/al_lock_sample_id/3.md) will possibly be playing a different sound, so you should only use it after locking the id again.

## SEE ALSO

[al\_play\_sample(3)](/al_play_sample/3.md), [al\_lock\_sample\_id(3)](/al_lock_sample_id/3.md)

## SINCE

5\.2.3

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