mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Fix volume application
This commit is contained in:
parent
f3e49ab0a8
commit
d7c314dc18
4
sfxr.lua
4
sfxr.lua
@ -376,8 +376,8 @@ function sfxr.Sound:generate(freq, bits)
|
||||
end
|
||||
|
||||
-- Apply the volumes
|
||||
ssample = ssample / self.superSamples * self.volume.master
|
||||
ssample = ssample * 2 * self.volume.sound
|
||||
ssample = (ssample / self.superSamples) * self.volume.master
|
||||
ssample = (ssample * 2) * self.volume.sound
|
||||
|
||||
-- Hard limit
|
||||
ssample = clamp(ssample, -1, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user