mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
Bugfix volume not being actually clamped
This commit is contained in:
parent
6d9dbda7b5
commit
d3bbedb30e
1 changed files with 4 additions and 1 deletions
|
@ -142,7 +142,10 @@ public class Audio : IPlugin
|
|||
var freq = L.CheckNumber(1);
|
||||
var time = L.OptNumber(2, 1);
|
||||
var volume = L.OptNumber(3, 1);
|
||||
Math.Clamp(volume, 0, 1);
|
||||
|
||||
|
||||
|
||||
volume = Math.Clamp(volume, 0, 1);
|
||||
|
||||
var buffer = Core.Audio.GenerateSquareWave(freq, time, volume);
|
||||
|
||||
|
|
Loading…
Reference in a new issue