Re-add GLOBAL_VOLUME but set it to 1 instead of 0.8

This commit is contained in:
刘皓 2024-09-02 21:35:36 -04:00
parent d3a0b4c9fb
commit 2b944a0b58
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -29,6 +29,8 @@
#include <assert.h>
#include <cmath>
#define GLOBAL_VOLUME 1.0f
namespace AL
{
@ -172,7 +174,7 @@ namespace Source
if (value > FLT_EPSILON) {
value = std::pow(10.0f, -(35.0f / 20.0f) * (1.0f - value));
}
alSourcef(id.al, AL_GAIN, value);
alSourcef(id.al, AL_GAIN, value * GLOBAL_VOLUME);
}
inline void setPitch(Source::ID id, float value)