Audio: Allow adjusting BGS and SE volumes via mkxp.conf
This commit is contained in:
parent
24efc4d2f2
commit
9cf5ee54e0
6 changed files with 17 additions and 2 deletions
|
|
@ -93,7 +93,8 @@ SoundEmitter::SoundEmitter(const Config &conf)
|
|||
srcCount(conf.SE.sourceCount),
|
||||
alSrcs(srcCount),
|
||||
atchBufs(srcCount),
|
||||
srcPrio(srcCount)
|
||||
srcPrio(srcCount),
|
||||
configVolume(conf.volume.se)
|
||||
{
|
||||
for (size_t i = 0; i < srcCount; ++i)
|
||||
{
|
||||
|
|
@ -172,7 +173,7 @@ void SoundEmitter::play(const std::string &filename,
|
|||
if (switchBuffer)
|
||||
AL::Source::attachBuffer(src, buffer->alBuffer);
|
||||
|
||||
AL::Source::setVolume(src, _volume * GLOBAL_VOLUME);
|
||||
AL::Source::setVolume(src, _volume * configVolume * GLOBAL_VOLUME);
|
||||
AL::Source::setPitch(src, _pitch);
|
||||
|
||||
AL::Source::play(src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue