Better master volume lookup

This commit is contained in:
Jack Andersen 2016-07-13 20:36:12 -10:00
parent d602fbacd3
commit e2581cea8b
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ extern "C" const float VolumeLUT[];
/** Set total volume of engine */ /** Set total volume of engine */
void Engine::setVolume(float vol) void Engine::setVolume(float vol)
{ {
m_backend.setVolume(VolumeLUT[int(vol * 65536)]); m_backend.setVolume(VolumeLUT[int(clamp(0.f, vol, 1.f) * 65536)] * 1.46245869f);
} }
/** Find voice from VoiceId */ /** Find voice from VoiceId */