diff options
| author | Rikki <i@rikki.moe> | 2025-04-19 15:50:30 +0800 |
|---|---|---|
| committer | Rikki <i@rikki.moe> | 2025-04-19 15:50:30 +0800 |
| commit | 4ca4f0283b92d9c2ea92d61dd9a48b29c07d60f8 (patch) | |
| tree | 7e2cf3a334e5e89214a518e0e084bf08ee2b7aaa | |
| parent | 00806ca12b6b5157c06709eea356e72992b99a9b (diff) | |
remove audio gain
| -rw-r--r-- | scripts/main.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/scripts/main.js b/scripts/main.js index c371208..e3e2546 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -84,12 +84,7 @@ async function playSound(file, playSpeed = 1, minTime = null) { src.playbackRate.value = playSpeed; src.loop = true; - const gain = ctx.createGain(); - gain.gain.setValueAtTime(1, startTime); - gain.gain.setValueAtTime(1, stopTime - fadeTime); - gain.gain.linearRampToValueAtTime(0, stopTime); - - src.connect(gain).connect(ctx.destination); + src.connect(ctx.destination); src.start(startTime); src.stop(stopTime); |
