blip
0.1
|
A class representing a vibration (haptic feedback) device. More...
#include <Vibrator.hpp>
Public Member Functions | |
~Vibrator () | |
Destructor. More... | |
void | setVibrating (bool on) |
Turn the vibration function on or off. More... | |
bool | isVibrating () |
Test if the vibration function is currently on. More... | |
void | setFrequency (uint_t milliHertz) |
Set the vibration frequency. More... | |
uint_t | getFrequency () |
Get the vibration frequency. More... | |
bool | supportsFrequency () const |
Test if the device supports changing the vibration frequency. More... | |
uint_t | getMinFrequency () const |
Get the minimum frequency supported by the device. More... | |
uint_t | getMaxFrequency () const |
Get the maximum frequency supported by the device. More... | |
void | setIntensity (uint_t perMille) |
Set the vibration intensity. More... | |
uint_t | getIntensity () |
Get the vibration intensity. More... | |
bool | supportsIntensity () const |
Test if the device supports changing the vibration intensity. More... | |
uint_t | getMinIntensity () const |
Get the minimum intensity supported by the device. More... | |
uint_t | getMaxIntensity () const |
Get the maximum intensity supported by the device. More... | |
A class representing a vibration (haptic feedback) device.
Instances of this class may be obtained from an AudioEngine.
NOTE: As of Android platform version 9, the OpenSL implementation is missing vibrator functionality.
~Vibrator | ( | ) |
Destructor.
uint_t getFrequency | ( | ) |
Get the vibration frequency.
AudioException | If an error occurs. |
uint_t getIntensity | ( | ) |
Get the vibration intensity.
AudioException | If an error occurs. |
|
inline |
Get the maximum frequency supported by the device.
|
inline |
Get the maximum intensity supported by the device.
|
inline |
Get the minimum frequency supported by the device.
|
inline |
Get the minimum intensity supported by the device.
bool isVibrating | ( | ) |
Test if the vibration function is currently on.
AudioException | If an error occurs. |
void setFrequency | ( | uint_t | milliHertz | ) |
Set the vibration frequency.
milliHertz | The new frequency, in millihertz. |
AudioException | If an error occurs. |
void setIntensity | ( | uint_t | perMille | ) |
Set the vibration intensity.
perMille | The new intensity, in per mille (tenths of 1%). |
AudioException | If an error occurs. |
void setVibrating | ( | bool | on | ) |
Turn the vibration function on or off.
on | A flag indicating whether to turn vibration on or off. |
AudioException | If an error occurs. |
|
inline |
Test if the device supports changing the vibration frequency.
|
inline |
Test if the device supports changing the vibration intensity.