---
name: "al_get_sample_instance_length"
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_get_sample_instance_length"
---

# al\_get\_sample\_instance\_length(3)

Allegro 5 API

## NAME

al\_get\_sample\_instance\_length - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  unsigned int al_get_sample_instance_length(const ALLEGRO_SAMPLE_INSTANCE *spl)
  ```

## DESCRIPTION

Return the length of the sample instance in sample values. This property may differ from the length of the instance’s sample data.

## SEE ALSO

[al\_set\_sample\_instance\_length(3)](/al_set_sample_instance_length/3.md), [al\_get\_sample\_instance\_time(3)](/al_get_sample_instance_time/3.md)
