mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- treat 100 as maximum volume for 2D sounds when coming from the SFX data.
Without this, many sounds are way too quiet, e.g. at tne beginning of E2M1 or the end of E3M7. Fixes #146.
This commit is contained in:
parent
85364c2bb6
commit
fcc271ed7b
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ void sndStartSample(unsigned int nSound, int nVolume, int nChannel, bool bLoop)
|
|||
if (nVolume < 0)
|
||||
{
|
||||
auto udata = soundEngine->GetUserData(snd);
|
||||
if (udata) nVolume = udata[2];
|
||||
if (udata) nVolume = std::min(Scale(udata[2], 255, 100), 255);
|
||||
else nVolume = 255;
|
||||
}
|
||||
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, (nChannel + 1), (bLoop? CHANF_LOOP : EChanFlags::FromInt(0)), snd, nVolume / 255.f, ATTN_NONE);
|
||||
|
|
Loading…
Reference in a new issue