1al_rumble_haptic(3) al_rumble_haptic(3)
2
3
4
6 al_rumble_haptic - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 bool al_rumble_haptic(ALLEGRO_HAPTIC *hap,
12 double intensity, double duration, ALLEGRO_HAPTIC_EFFECT_ID *id)
13
15 Uploads a simple rumble effect to the haptic device and starts playback
16 immediately. The parameter intensity is a relative magnitude between
17 0.0 and 1.0 that determines the intensity of the rumble effect. The
18 duration determines the duration of the effect in seconds.
19
20 You must also pass in a pointer to a user allocated ALLEGRO_HAPTIC_EF‐
21 FECT_ID(3). It it is stored a reference to be used to control playback
22 of the effect. Returns true if the rumble effect was successfully up‐
23 loaded and started, false if not.
24
25 In case false is returned, the rumble effect will be automatically re‐
26 leased as if al_release_haptic_effect(3) had been called, so there is
27 no need to call it again manually in this case. However, if true is
28 returned, it is necessary to call al_release_haptic_effect(3) when the
29 effect isn’t needed anymore, to prevent the amount of available effects
30 on the haptic device from running out.
31
33 5.1.8
34
35 [Unstable API]: Perhaps could be simplified due to limited sup‐
36 port for all the exposed features across all of the platforms.
37 Awaiting feedback from users.
38
39
40
41Allegro reference manual al_rumble_haptic(3)