diff --git a/src/renderer/components/audio-player/index.tsx b/src/renderer/components/audio-player/index.tsx index 559eb14ad..59e2c03c9 100644 --- a/src/renderer/components/audio-player/index.tsx +++ b/src/renderer/components/audio-player/index.tsx @@ -81,7 +81,7 @@ export const AudioPlayer = forwardRef( const calculateReplayGain = useCallback( (song: Song): number => { if (playback.replayGainMode === 'no') { - return 1; + return volume; } let gain: number | undefined; @@ -99,7 +99,7 @@ export const AudioPlayer = forwardRef( gain = playback.replayGainFallbackDB; if (!gain) { - return 1; + return volume; } } @@ -116,13 +116,14 @@ export const AudioPlayer = forwardRef( if (playback.replayGainClip) { return Math.min(expectedGain, 1 / peak); } - return expectedGain; + return expectedGain * volume; }, [ playback.replayGainClip, playback.replayGainFallbackDB, playback.replayGainMode, playback.replayGainPreampDB, + volume, ], ); @@ -311,6 +312,9 @@ export const AudioPlayer = forwardRef( [player2Source, webAudio], ); + // Bugfix for Safari: rather than use the `