Providers
This module contains the functions related to providers.
Functions
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
Articles
- interhaptics_providers_init
- interhaptics_providers_available
- interhaptics_providers_clean
- interhaptics_providers_render_haptics
interhaptics_providers_init
This function handles the initialisation process of the specific device's COM, its haptic settings for rendering and subscription to the Interhaptics Engine. It returns false if the initialisation process fails.
Syntax:
interhaptics_providers_init()
Returns:
Boolean
interhaptics_providers_available
This function checks the availability of the device before triggering haptic playback. It returns true if the provider is present, false if not.
This optional step can help improve performance.
Syntax:
interhaptics_providers_available()
Returns:
Boolean
interhaptics_providers_clean
This function is responsible for de-initialising the device's COM, if necessary, and for unsubscribing the provider from the Interhaptics Engine. It returns false if the de-initialisation process fails.
Syntax:
interhaptics_providers_clean()
Returns:
Boolean
interhaptics_providers_render_haptics
API triggers the rendering process for the provider by retrieving the necessary haptic buffers, transcoding them if required, and playing them back on the associated device. This API must be called for all targeted devices. It is mandatory to call interhaptics_compute_all_events from the Interhaptics Engine before calling interhaptics_providers_render_haptics for synchronized haptic rendering. Typically, both APIs are implemented in the same loop, with interhaptics_compute_all_events called before the interhaptics_providers_render_haptics calls.
Syntax:
interhaptics_providers_render_haptics()
Returns:
N/A