---
name: "get_hardware_volume"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/get_hardware_volume/3alleg4"
---

# get\_hardware\_volume(3alleg4)

Retrieves the hardware sound output volume. Allegro game programming library.

## NAME

get\_hardware\_volume - Retrieves the hardware sound output volume. Allegro game programming library.

## SYNOPSIS

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

**void get\_hardware\_volume(int \*digi\_volume, int \*midi\_volume);**

## DESCRIPTION

Retrieves the hardware sound output volume, both for digital samples and MIDI playback, as integers from 0 to 255, or -1 if the information is not available. Parameters digi\_volume and midi\_volume must be valid pointers to int, or NULL if not interested in specific value.

## SEE ALSO

**set\_hardware\_volume**(3alleg4), **get\_volume**(3alleg4)
