////REVIEW: Devices usually will automatically shut down haptics if they haven't received a haptics command in some time.
//// How should we deal with that? Should haptics automatically refresh themselves periodically while they are set?
////REVIEW: Do we need a mute in addition to a pause?
namespace UnityEngine.InputSystem.Haptics
{
///
/// Base interface for haptics on input devices.
///
///
/// To support haptics, an has to implement one or more
/// haptics interfaces.
///
///
///
/// class MyDevice : InputDevice, IDualMotorRumble
/// {
/// private DualMotorRumble m_Rumble;
///
/// public void SetMotorSpeeds(float lowFrequency, float highFrequency)
/// {
/// m_Rumble.SetMotorSpeeds(lowFrequency, highFrequency);
/// }
///
/// public void PauseHaptics()
/// {
/// m_Rumble.PauseHaptics();
/// }
///
/// public void ResumeHaptics()
/// {
/// m_Rumble.ResumeHaptics();
/// }
///
/// public void ResetHaptics()
/// {
/// m_Rumble.ResetHaptics();
/// }
/// }
///
///
///
///
///
public interface IHaptics
{
///
/// Pause haptics playback on the device.
///
///
/// This should preserve current playback settings (such as motor speed levels
/// or effect playback positions) but shut down feedback effects on the device.
///
/// If proper resumption of effects is not possible, playback should be stopped
/// and is allowed to be a no-operation.
///
/// Note that haptics playback states are not required to survive domain reloads
/// in the editor.
///
///
void PauseHaptics();
///
/// Resume haptics playback on the device.
///
///
/// Should be called after calling . Otherwise does
/// nothing.
///
void ResumeHaptics();
///
/// Reset haptics playback on the device to its default state.
///
///
/// This will turn off all haptics effects that may be playing on the device.
///
void ResetHaptics();
}
}