MCPcopy Create free account
hub / github.com/LibreVR/Revive / SetConstant

Method SetConstant

Revive/HapticsBuffer.cpp:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void HapticsBuffer::SetConstant(float frequency, float amplitude)
31{
32 // The documentation specifies a constant vibration should time out after 2.5 seconds
33 m_ConstantMutex.lock();
34 m_Amplitude = amplitude;
35 m_Frequency = frequency;
36 m_ConstantMutex.unlock();
37 m_ConstantTimeout = (uint16_t)(REV_HAPTICS_SAMPLE_RATE * 5);
38}
39
40float HapticsBuffer::GetSample()
41{

Callers 1

SetVibrationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected