diff options
Diffstat (limited to 'game/client/sound.cc')
| -rw-r--r-- | game/client/sound.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/game/client/sound.cc b/game/client/sound.cc index c3ea543..28e0143 100644 --- a/game/client/sound.cc +++ b/game/client/sound.cc @@ -84,11 +84,11 @@ void sound::deinit(void) void sound::update(void) { - auto effects_gain = cxpr::clamp(0.01f * sound::volume_effects.get_value(), 0.0f, 1.0f); + auto effects_gain = vx::clamp(0.01f * sound::volume_effects.get_value(), 0.0f, 1.0f); alSourcef(generic_source, AL_GAIN, effects_gain); alSourcef(player_source, AL_GAIN, effects_gain); - auto ui_gain = cxpr::clamp(0.01f * sound::volume_ui.get_value(), 0.0f, 1.0f); + auto ui_gain = vx::clamp(0.01f * sound::volume_ui.get_value(), 0.0f, 1.0f); alSourcef(ui_source, AL_GAIN, ui_gain); } @@ -137,7 +137,7 @@ void sound::play_generic(resource_ptr<SoundEffect> sound, bool looping, float pi if(sfx_generic) { alSourcei(generic_source, AL_BUFFER, sfx_generic->buffer); alSourcei(generic_source, AL_LOOPING, looping); - alSourcef(generic_source, AL_PITCH, cxpr::clamp(pitch, MIN_PITCH, MAX_PITCH)); + alSourcef(generic_source, AL_PITCH, vx::clamp(pitch, MIN_PITCH, MAX_PITCH)); alSourcePlay(generic_source); } } @@ -153,7 +153,7 @@ void sound::play_entity(entt::entity entity, resource_ptr<SoundEffect> sound, bo if(emitter->sound) { alSourcei(emitter->source, AL_BUFFER, emitter->sound->buffer); alSourcei(emitter->source, AL_LOOPING, looping); - alSourcef(emitter->source, AL_PITCH, cxpr::clamp(pitch, MIN_PITCH, MAX_PITCH)); + alSourcef(emitter->source, AL_PITCH, vx::clamp(pitch, MIN_PITCH, MAX_PITCH)); alSourcePlay(emitter->source); } } @@ -179,7 +179,7 @@ void sound::play_player(resource_ptr<SoundEffect> sound, bool looping, float pit if(sfx_player) { alSourcei(player_source, AL_BUFFER, sfx_player->buffer); alSourcei(player_source, AL_LOOPING, looping); - alSourcef(player_source, AL_PITCH, cxpr::clamp(pitch, MIN_PITCH, MAX_PITCH)); + alSourcef(player_source, AL_PITCH, vx::clamp(pitch, MIN_PITCH, MAX_PITCH)); alSourcePlay(player_source); } } @@ -193,7 +193,7 @@ void sound::play_ui(resource_ptr<SoundEffect> sound, bool looping, float pitch) if(sfx_ui) { alSourcei(ui_source, AL_BUFFER, sfx_ui->buffer); alSourcei(ui_source, AL_LOOPING, looping); - alSourcef(ui_source, AL_PITCH, cxpr::clamp(pitch, MIN_PITCH, MAX_PITCH)); + alSourcef(ui_source, AL_PITCH, vx::clamp(pitch, MIN_PITCH, MAX_PITCH)); alSourcePlay(ui_source); } }
\ No newline at end of file |
