diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index 93088ee..37777ef 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -76,7 +76,7 @@ class Player extends ((PlayerEmitter as unknown) as { new (): EventEmitter }) { } _applyVolume() { - const level = this.volume * (this.trim === 0 ? 1 : this.trim); + const level = this.volume + this.trim; const linear = Math.pow(10, (level/10)); if (linear < 1) { this.wavesurfer.setVolume(linear); diff --git a/src/mixer/state.ts b/src/mixer/state.ts index 8a29ff3..1ef74fe 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -500,11 +500,11 @@ export const setVolume = ( let uiLevel: number; switch (level) { case "off": - volume = 0; + volume = -36; uiLevel = 0; break; case "bed": - volume = 0.1; + volume = -12; uiLevel = 0.5; break; case "full": @@ -542,7 +542,6 @@ export const setVolume = ( }); const gainTween = new Between(currentGain, volume) .time(FADE_TIME_SECONDS * 1000) - .easing((Between as any).Easing.Exponential.InOut) .on("update", (val: number) => { if (typeof audioEngine.players[player] !== "undefined") { audioEngine.players[player]?.setVolume(val);