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

Method StopSound

sndlib/hlsoundlib.cpp:1308–1321  ·  view source on GitHub ↗

Forcefully ends a sound

Source from the content-addressed store, hash-verified

1306}
1307// Forcefully ends a sound
1308void hlsSystem::StopSound(int sound_obj_index, uint8_t f_stop_priority) {
1309 if (!m_f_hls_system_init)
1310 return;
1311 m_sound_objects[sound_obj_index].m_obj_type_flags &= (~SIF_LOOPING);
1312
1313 if (m_sound_objects[sound_obj_index].m_sound_uid != -1) {
1314 mprintf(1, "stopSound %d \n", m_sound_objects[sound_obj_index].m_sound_uid);
1315 m_ll_sound_ptr->StopSound(m_sound_objects[sound_obj_index].m_sound_uid, f_stop_priority);
1316 }
1317 if (f_stop_priority == SKT_STOP_IMMEDIATELY || m_sound_objects[sound_obj_index].m_sound_uid == -1) {
1318 m_sound_objects[sound_obj_index].m_obj_type_flags = SIF_UNUSED;
1319 m_sound_objects[sound_obj_index].m_hlsound_uid = -1;
1320 }
1321}
1322// Stops all sounds attached to an object
1323void hlsSystem::StopObjectSound(int objhandle) {
1324 int i;

Callers 1

BeginSoundFrameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected