mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-18 07:30:29 +00:00
test(ui): leave songs without ReplayGain tags unaffected by the pre-amp
Signed-off-by: junkerderprovinz <jdp@braethoria.com>
This commit is contained in:
parent
df6ec04c44
commit
f2bdc8c111
@ -56,6 +56,17 @@ describe('calculateGain', () => {
|
||||
expect(result).toBe(1)
|
||||
})
|
||||
|
||||
it.each(['album', 'track'])(
|
||||
'does not apply the pre-amp in %s mode to a song without gain tags',
|
||||
(gainMode) => {
|
||||
const result = calculateGain(
|
||||
{ gainMode, preAmp: 6 },
|
||||
{ ...nativeTrackOnlySong, rgTrackGain: null, rgTrackPeak: null },
|
||||
)
|
||||
expect(result).toBe(1)
|
||||
},
|
||||
)
|
||||
|
||||
it('uses track gain in track mode', () => {
|
||||
const result = calculateGain({ gainMode: 'track', preAmp }, albumSong)
|
||||
expect(result).toBeCloseTo(10 ** (-3 / 20))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user