al_set_haptic_gain(3alleg5)
π al_set_haptic_gain β Allegro 5 API π
okay bestie, welcome to the Allegro 5 manual, this one's about al_set_haptic_gain, and it's giving "turn the vibes up (or down) on your rumble toy" β¨
πΈ NAME πΈ
al_set_haptic_gain β Allegro 5 API
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
bool al_set_haptic_gain(ALLEGRO_HAPTIC *hap, double gain)
π DESCRIPTION π
So like, this function sets the gain of the haptic device β but only if the device actually supports it, no cap. Think of gain as the volume knob for sound, but for haptics: it's as if every single effect's intensity gets multiplied by it. π
Gain is a value between 0.0 and 1.0. The function returns true if it got set successfully, and false if it didn't. π
Heads up bestie: this ONLY works ifal_get_haptic_capabilities(3alleg5)returns a value that hasALLEGRO_HAPTIC_GAIN(3alleg5)ALLEGRO_HAPTIC_CONSTANTS(3alleg5)set. If it doesn't, this function just returnsfalse, and all effects will be played without any gain influence at all. periodt.
π¦ 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. π (yes queen, they're literally waiting on you)
that's the whole page, you ate that π«Ά this was the Allegro reference manual talking about al_set_haptic_gain(3alleg5) β mwah, go make something rumble πβ¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms