Allows for changes in a currently playing sound
| 828 | } |
| 829 | // Allows for changes in a currently playing sound |
| 830 | int hlsSystem::Update2dSound(int hlsound_uid, float volume, float pan) { |
| 831 | int sound_obj_index; |
| 832 | |
| 833 | if (!m_f_hls_system_init) |
| 834 | return -1; |
| 835 | if (volume < 0.0f) |
| 836 | volume = 0.0f; |
| 837 | else if (volume > 1.0f) |
| 838 | volume = 1.0f; |
| 839 | if (pan < -1.0f) |
| 840 | pan = -1.0f; |
| 841 | else if (pan > 1.0f) |
| 842 | pan = 1.0f; |
| 843 | if (!m_f_hls_system_init) |
| 844 | return -1; |
| 845 | sound_obj_index = ValidateUniqueId(hlsound_uid); |
| 846 | if (sound_obj_index == -1) |
| 847 | return -1; |
| 848 | m_ll_sound_ptr->AdjustSound(m_sound_objects[sound_obj_index].m_sound_uid, volume, pan, 22050); |
| 849 | return hlsound_uid; |
| 850 | } |
| 851 | bool hlsSystem::ComputePlayInfo(int sound_obj_index, vector *virtual_pos, vector *virtual_vel, float *adjusted_volume) { |
| 852 | int sound_index; |
| 853 |
no test coverage detected