Kills the sound library
| 552 | } |
| 553 | // Kills the sound library |
| 554 | void hlsSystem::KillSoundLib(bool f_kill_sound_list) { |
| 555 | int i; |
| 556 | if (m_f_hls_system_init) { |
| 557 | mprintf(1, "m_sounds_played %d\n", m_sounds_played); |
| 558 | // clean up stream system |
| 559 | AudioStream::Shutdown(); |
| 560 | for (i = 0; i < MAX_SOUND_OBJECTS; i++) { |
| 561 | m_sound_objects[i].m_obj_type_flags = SIF_UNUSED; |
| 562 | m_sound_objects[i].m_hlsound_uid = -1; |
| 563 | } |
| 564 | m_ll_sound_ptr->DestroySoundLib(); |
| 565 | m_f_hls_system_init = 0; |
| 566 | } |
| 567 | if (m_ll_sound_ptr) { |
| 568 | delete m_ll_sound_ptr; |
| 569 | m_ll_sound_ptr = NULL; |
| 570 | } |
| 571 | // This is independant of the actual sound_lib status. It happened because sounds |
| 572 | // use the manage system. |
| 573 | // moved this from beginning of function because won't the data freed here screw up streaming/looping sounds? |
| 574 | // before the sound library is closed? |
| 575 | if (f_kill_sound_list) { |
| 576 | for (int i = 0; i < MAX_SOUND_FILES; i++) { |
| 577 | SoundLoadFree(i); |
| 578 | } |
| 579 | } |
| 580 | } |
| 581 | // Pause and Resume the library |
| 582 | // Pauses all sounds |
| 583 | void hlsSystem::PauseSounds(bool f_all_pause) { |
no test coverage detected