MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setPitchMultiplier

Method setPitchMultiplier

source/base/StarMixer.cpp:84–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void AudioInstance::setPitchMultiplier(float targetValue, float rampTime) {
85 starAssert(targetValue >= 0);
86 MutexLocker locker(m_mutex);
87
88 if (m_stopping)
89 return;
90
91 if (rampTime <= 0.0f) {
92 m_pitchMultiplier = targetValue;
93 m_pitchMultiplierTarget = targetValue;
94 m_pitchMultiplierVelocity = 0.0f;
95 } else {
96 m_pitchMultiplierTarget = targetValue;
97 m_pitchMultiplierVelocity = rateOfChangeFromRampTime(rampTime);
98 }
99}
100
101int AudioInstance::loops() const {
102 MutexLocker locker(m_mutex);

Callers 7

soundsFromDefinitionFunction · 0.80
processActionMethod · 0.80
renderMethod · 0.80
playbackMethod · 0.80
updateMethod · 0.80
playAudioMethod · 0.80
addChatActionsMethod · 0.80

Calls 1

rateOfChangeFromRampTimeFunction · 0.85

Tested by

no test coverage detected