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

Method stop

source/base/StarMixer.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void AudioInstance::stop(float rampTime) {
145 MutexLocker locker(m_mutex);
146
147 if (rampTime <= 0.0f) {
148 m_volume.value = 0.0f;
149 m_volume.target = 0.0f;
150 m_volume.velocity = 0.0f;
151
152 m_pitchMultiplierTarget = 0.0f;
153 m_pitchMultiplierVelocity = 0.0f;
154 } else {
155 m_volume.target = 0.0f;
156 m_volume.velocity = rateOfChangeFromRampTime(rampTime);
157 }
158
159 m_stopping = true;
160}
161
162bool AudioInstance::finished() const {
163 return m_finished;

Callers 1

stopAllMethod · 0.45

Calls 1

rateOfChangeFromRampTimeFunction · 0.85

Tested by

no test coverage detected