---
name: "get_hardware_volume"
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/get_hardware_volume"
---

# get\_hardware\_volume(3alleg)

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**(3alleg)](/set_hardware_volume/3alleg.md), [**get\_volume**(3alleg)](/get_volume/3alleg.md)
