Forcefully ends a sound
| 1306 | } |
| 1307 | // Forcefully ends a sound |
| 1308 | void 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 |
| 1323 | void hlsSystem::StopObjectSound(int objhandle) { |
| 1324 | int i; |