diff --git a/sfxr.lua b/sfxr.lua index 5b873d8..45f8dd2 100644 --- a/sfxr.lua +++ b/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)