summaryrefslogtreecommitdiffstats
path: root/game/client/sound.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-06-28 01:59:49 +0500
committeruntodesu <kirill@untode.su>2025-06-28 01:59:49 +0500
commit61e5bcef2629e2d68b805a956a96fff264d4f74d (patch)
treebca3a94bac79d34e3c0db57c77604f5a823ecbda /game/client/sound.cc
parent88c01588aa0830e219eaa62588839e4d1e2883ce (diff)
downloadvoxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.tar.bz2
voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.zip
Restructure dependencies and update to C++20
- Nuked static_assert from almost everywhere in the project - Nuked binary dependency support. Might add one later though - Separated dependency headers into a separate include subdirectory - Grafted a thirdpartylegalnotices.txt generator from RITEG - Pushed development snapshot version to 2126 (26th week of 2025)
Diffstat (limited to 'game/client/sound.cc')
-rw-r--r--game/client/sound.cc12
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