| 419 | } |
| 420 | |
| 421 | void lnxsound::AdjustSound(int sound_uid, float f_volume, float f_pan, uint16_t frequency) { |
| 422 | int current_slot; |
| 423 | |
| 424 | if (sound_device == 0) |
| 425 | return; |
| 426 | |
| 427 | if ((current_slot = ValidateUniqueId(sound_uid)) == -1) |
| 428 | return; |
| 429 | if (sound_cache[current_slot].m_status == SSF_UNUSED) |
| 430 | return; |
| 431 | |
| 432 | sound_buffer_info *sb = &sound_cache[current_slot]; |
| 433 | play_information *play_info = sb->play_info; |
| 434 | |
| 435 | play_info->left_volume = play_info->right_volume = f_volume; |
| 436 | if (f_pan < 0.0) |
| 437 | play_info->right_volume += f_volume * f_pan; |
| 438 | else |
| 439 | play_info->left_volume -= f_volume * f_pan; |
| 440 | } |
| 441 | |
| 442 | void lnxsound::AdjustSound(int sound_uid, pos_state *cur_pos, float adjusted_volume, float reverb) { |
| 443 | if (sound_device == 0) |
no test coverage detected