File: al_rumble_haptic.3

package info (click to toggle)
allegro5 2%3A5.2.6.0-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 24,212 kB
  • sloc: ansic: 125,319; cpp: 15,781; objc: 4,579; python: 2,802; java: 2,254; javascript: 1,204; sh: 1,002; makefile: 51; perl: 37; xml: 25; pascal: 24
file content (48 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "al_rumble_haptic" "3" "" "Allegro reference manual" ""
.hy
.SH NAME
.PP
al_rumble_haptic \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

bool\ al_rumble_haptic(ALLEGRO_HAPTIC\ *hap,
\ \ \ double\ intensity,\ double\ duration,\ ALLEGRO_HAPTIC_EFFECT_ID\ *id)
\f[]
.fi
.SH DESCRIPTION
.PP
Uploads a simple rumble effect to the haptic device and starts playback
immediately.
The parameter \f[C]intensity\f[] is a relative magnitude between 0.0 and
1.0 that determines the intensity of the rumble effect.
The \f[C]duration\f[] determines the duration of the effect in seconds.
.PP
You must also pass in a pointer to a user allocated
ALLEGRO_HAPTIC_EFFECT_ID(3).
It it is stored a reference to be used to control playback of the
effect.
Returns true if the rumble effect was successfully uploaded and started,
false if not.
.PP
In case false is returned, the rumble effect will be automatically
released as if al_release_haptic_effect(3) had been called, so there is
no need to call it again manually in this case.
However, if true is returned, it is necessary to call
al_release_haptic_effect(3) when the effect isn\[aq]t needed anymore, to
prevent the amount of available effects on the haptic device from
running out.
.SH SINCE
.PP
5.1.8
.RS
.PP
\f[I][Unstable API]:\f[] Perhaps could be simplified due to limited
support for all the exposed features across all of the platforms.
Awaiting feedback from users.
.RE