Add sound gain config
This commit is contained in:
parent
cdd794ed9c
commit
10e8e8b14b
@ -38,6 +38,7 @@
|
|||||||
DEFINE_SPADES_SETTING(s_maxPolyphonics, "96");
|
DEFINE_SPADES_SETTING(s_maxPolyphonics, "96");
|
||||||
DEFINE_SPADES_SETTING(s_eax, "1");
|
DEFINE_SPADES_SETTING(s_eax, "1");
|
||||||
DEFINE_SPADES_SETTING(s_alPreciseErrorCheck, "1");
|
DEFINE_SPADES_SETTING(s_alPreciseErrorCheck, "1");
|
||||||
|
DEFINE_SPADES_SETTING(s_gain, "1");
|
||||||
|
|
||||||
// lm: seems to be missing for me..
|
// lm: seems to be missing for me..
|
||||||
#ifndef ALC_ALL_DEVICES_SPECIFIER
|
#ifndef ALC_ALL_DEVICES_SPECIFIER
|
||||||
@ -210,7 +211,7 @@ namespace spades {
|
|||||||
|
|
||||||
al::qalSourcef(handle, AL_PITCH, param.pitch);
|
al::qalSourcef(handle, AL_PITCH, param.pitch);
|
||||||
ALCheckErrorPrecise();
|
ALCheckErrorPrecise();
|
||||||
al::qalSourcef(handle, AL_GAIN, param.volume);
|
al::qalSourcef(handle, AL_GAIN, param.volume * (float)s_gain);
|
||||||
ALCheckErrorPrecise();
|
ALCheckErrorPrecise();
|
||||||
al::qalSourcef(handle, AL_REFERENCE_DISTANCE, param.referenceDistance);
|
al::qalSourcef(handle, AL_REFERENCE_DISTANCE, param.referenceDistance);
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ DEFINE_SPADES_SETTING(s_ysrDriver, "libysrspades.so");
|
|||||||
|
|
||||||
DEFINE_SPADES_SETTING(s_ysrNumThreads, "2");
|
DEFINE_SPADES_SETTING(s_ysrNumThreads, "2");
|
||||||
SPADES_SETTING(s_maxPolyphonics);
|
SPADES_SETTING(s_maxPolyphonics);
|
||||||
|
SPADES_SETTING(s_gain);
|
||||||
DEFINE_SPADES_SETTING(s_ysrBufferSize, "1024");
|
DEFINE_SPADES_SETTING(s_ysrBufferSize, "1024");
|
||||||
DEFINE_SPADES_SETTING(s_ysrDebug, "0");
|
DEFINE_SPADES_SETTING(s_ysrDebug, "0");
|
||||||
|
|
||||||
@ -554,7 +555,7 @@ namespace spades {
|
|||||||
YsrContext::PlayParam param;
|
YsrContext::PlayParam param;
|
||||||
param.pitch = base.pitch;
|
param.pitch = base.pitch;
|
||||||
param.referenceDistance = base.referenceDistance;
|
param.referenceDistance = base.referenceDistance;
|
||||||
param.volume = base.volume;
|
param.volume = base.volume * (float)s_gain;
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user