| 82 | } |
| 83 | |
| 84 | void 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 | |
| 101 | int AudioInstance::loops() const { |
| 102 | MutexLocker locker(m_mutex); |
no test coverage detected