---
name: "voice_check"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/voice_check"
---

# voice\_check(3alleg)

Checks whether a voice is currently allocated. Allegro game programming library.

## NAME

voice\_check - Checks whether a voice is currently allocated. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**SAMPLE \*voice\_check(int voice);**

## DESCRIPTION

Checks whether a voice is currently allocated.

## RETURN VALUE

Returns a pointer to the sample that the voice is using, or NULL if the voice is inactive (ie. it has been deallocated, or the release\_voice() function has been called and the sample has then finished playing).

## SEE ALSO

[**allocate\_voice**(3alleg)](/allocate_voice/3alleg.md), [**voice\_start**(3alleg)](/voice_start/3alleg.md), [**voice\_get\_position**(3alleg)](/voice_get_position/3alleg.md)
