ws-audio2: merge ws/audio2-adpcm (codecs/audio/Adpcm, Qoa; adx, vag, brstm/bcstm/bfstm, raw adpcm, qoa; wav/aiff/caf/xm ADPCM)
This commit is contained in:
commit
703af4cc71
43 files changed
+5121
-197
No files matched your search
+8
-2
@@ -1,5 +1,6 @@
|
||||
-- music/xm tests: generated FastTracker 2 modules (tools/fixtures/xm.py) parsed, rendered through codecs/audio/Tracker and
|
||||
-- compared with openmpt123's render (loudness envelope, band spectrum, stereo balance, song length), the XM writer's
|
||||
-- compared with openmpt123's render (loudness envelope, band spectrum, stereo balance, song length; a ModPlug ADPCM
|
||||
-- sample), the XM writer's
|
||||
-- round trip, the contract, and the fuzz no-throw pass.
|
||||
local T = require("@tests/T")
|
||||
local S = require("@tests/music/_similar")
|
||||
@@ -44,7 +45,12 @@ for _, c in Cases do
|
||||
t:check(out, c.name .. ": encode " .. tostring(werr))
|
||||
local m2 = Xm.decode(Bytes.reader(out :: buffer))
|
||||
t:check(m2, c.name .. ": re-decode")
|
||||
t:eq(buffer.tostring(out :: buffer), c.data, c.name .. ": round trip bytes")
|
||||
if c.name == "adpcm" then
|
||||
-- ModPlug ADPCM is written back as delta PCM: the same samples, not the same bytes
|
||||
t:eq(buffer.tostring(m2.samples[1].data), buffer.tostring(m.samples[1].data), c.name .. ": samples kept")
|
||||
else
|
||||
t:eq(buffer.tostring(out :: buffer), c.data, c.name .. ": round trip bytes")
|
||||
end
|
||||
end
|
||||
|
||||
-- seek: the position after a seek and the output continuing
|
||||
|
||||
Reference in new issue
Block a user