---
name: "al_get_audio_stream_length_secs"
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_get_audio_stream_length_secs/3alleg5"
---

# al\_get\_audio\_stream\_length\_secs(3alleg5)

Allegro 5 API

## NAME

al\_get\_audio\_stream\_length\_secs - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_audio.h>
  double al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)
  ```

## DESCRIPTION

Return the length of the stream in seconds, if known. Otherwise returns zero.

Currently this can only be called on streams created with al\_load\_audio\_stream(3alleg5), al\_play\_audio\_stream(3alleg5), al\_load\_audio\_stream\_f(3alleg5) or al\_play\_audio\_stream\_f(3alleg5).

## SEE ALSO

al\_get\_audio\_stream\_position\_secs(3alleg5)
