MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / StopVoice

Function StopVoice

Descent3/voice.cpp:180–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void StopVoice(void) {
181 if (CurrentVoiceHandle.inuse) {
182 if (CurrentVoiceHandle.flags & VF_PLAYTABLE) {
183 if (CurrentVoiceHandle.handle != -1)
184 Sound_system.StopSoundImmediate(CurrentVoiceHandle.handle);
185 } else {
186 if (CurrentVoiceHandle.chandle != -1)
187 StreamStop(CurrentVoiceHandle.chandle);
188 }
189 }
190 CurrentVoiceHandle.handle = -1;
191 CurrentVoiceHandle.flags = 0;
192 CurrentVoiceHandle.chandle = -1;
193 CurrentVoiceHandle.inuse = false;
194}
195
196void UpdateVoices(void) {
197 char filename[_MAX_PATH];

Callers 3

CloseVoicesFunction · 0.85
PlayVoiceFunction · 0.85
UpdateVoicesFunction · 0.85

Calls 2

StreamStopFunction · 0.85
StopSoundImmediateMethod · 0.80

Tested by

no test coverage detected