Stops 2d and 3d sounds
| 527 | |
| 528 | // Stops 2d and 3d sounds |
| 529 | void lnxsound::StopSound(int sound_uid, uint8_t f_immediately) { |
| 530 | int current_slot; |
| 531 | sound_buffer_info *sb; |
| 532 | |
| 533 | if (sound_device == 0) |
| 534 | return; |
| 535 | |
| 536 | if ((current_slot = ValidateUniqueId(sound_uid)) == -1) |
| 537 | return; |
| 538 | |
| 539 | sb = &sound_cache[current_slot]; |
| 540 | |
| 541 | if (sb->m_status == SSF_UNUSED) |
| 542 | return; |
| 543 | |
| 544 | // update sound count. |
| 545 | m_cur_sounds_played--; |
| 546 | |
| 547 | if (f_immediately == SKT_STOP_AFTER_LOOP) { |
| 548 | sb->m_status &= ~SSF_PLAY_LOOPING; |
| 549 | sb->m_status |= SSF_PLAY_NORMAL; |
| 550 | return; |
| 551 | } |
| 552 | |
| 553 | sound_cache[current_slot].m_status = SSF_UNUSED; |
| 554 | } |
| 555 | |
| 556 | // Pause all sounds/resume all sounds |
| 557 | void lnxsound::PauseSounds() { |
no outgoing calls
no test coverage detected