1al_set_haptic_gain(3) al_set_haptic_gain(3)
2
3
4
6 al_set_haptic_gain - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 bool al_set_haptic_gain(ALLEGRO_HAPTIC *hap, double gain)
12
14 Sets the gain of the haptic device if supported. Gain is much like
15 volume for sound, it is as if every effect's intensity is multiplied by
16 it. Gain is a value between 0.0 and 1.0. Returns true if set sucess‐
17 fully, false if not. Only works if al_get_haptic_capabilities(3)
18 returns a value that has ALLEGRO_HAPTIC_GAIN(3)ALLEGRO_HAPTIC_CON‐
19 STANTS(3) set. If not, this function returns false, and all effects
20 will be played without any gain influence.
21
23 5.1.8
24
25 [Unstable API]: Perhaps could be simplified due to limited sup‐
26 port for all the exposed features across all of the platforms.
27 Awaiting feedback from users.
28
29
30
31Allegro reference manual al_set_haptic_gain(3)