Add R128_{TRACK,ALBUM}_GAIN support to the scanner (#3072)
* Add R128 gain tags support to the scanner * Add R128 test to metadata_internal_test.go * Pass explicit tag names to getGainValue function
This commit is contained in:
@@ -128,5 +128,17 @@ var _ = Describe("Tags", func() {
|
||||
Entry("Infinity", "Infinity", 1.0),
|
||||
Entry("Invalid value", "INVALID VALUE", 1.0),
|
||||
)
|
||||
DescribeTable("getR128GainValue",
|
||||
func(tag string, expected float64) {
|
||||
md := &Tags{}
|
||||
md.Tags = map[string][]string{"r128_track_gain": {tag}}
|
||||
Expect(md.RGTrackGain()).To(Equal(expected))
|
||||
|
||||
},
|
||||
Entry("0", "0", 5.0),
|
||||
Entry("-3776", "-3776", -9.75),
|
||||
Entry("Infinity", "Infinity", 0.0),
|
||||
Entry("Invalid value", "INVALID VALUE", 0.0),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user