Remove hardcoded value of 128 in favor of MIX_MAX_VOLUME macro in audio::engine
This commit is contained in:
parent
13b47877ce
commit
425d41eae4
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ namespace psemek::audio
|
||||||
|
|
||||||
void volume(float value) override
|
void volume(float value) override
|
||||||
{
|
{
|
||||||
int v = std::min(128, std::max(0, static_cast<int>(std::round(value * MIX_MAX_VOLUME))));
|
int v = std::min(MIX_MAX_VOLUME, std::max(0, static_cast<int>(std::round(value * MIX_MAX_VOLUME))));
|
||||||
Mix_Volume(channel, v);
|
Mix_Volume(channel, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue