---
name: "al_get_haptic_gain"
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_haptic_gain"
---

# al\_get\_haptic\_gain(3)

Allegro 5 API

## NAME

al\_get\_haptic\_gain - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  double al_get_haptic_gain(ALLEGRO_HAPTIC *hap)
  ```

## DESCRIPTION

Returns the current gain of the device. Gain is much like volume for sound, it is as if every effect’s intensity is multiplied by it. Gain is a value between 0.0 and 1.0. Only works correctly if [al\_get\_haptic\_capabilities(3)](/al_get_haptic_capabilities/3.md) returns a value that has ALLEGRO\_HAPTIC\_GAIN(3)[ALLEGRO\_HAPTIC\_CONSTANTS(3)](/ALLEGRO_HAPTIC_CONSTANTS/3.md) set. If this is not set, this function will simply return 1.0 and all effects will be played without any gain influence.

## SINCE

5\.1.8

*\[Unstable API\]:* Perhaps could be simplified due to limited support for all the exposed features across all of the platforms. Awaiting feedback from users.
