tests/audio: comments: specs only
This commit is contained in:
1 parent
75ddfb4068
commit
0eec255bfb
30 files changed
+66
-244
No files matched your search
@@ -1,7 +1,5 @@
|
||||
-- audio/adpcm tests: headerless streams (IMA nibbles, IMA WAV / MS blocks, Apple ima4, PS-ADPCM) decoded with the
|
||||
-- layout in the options, bit-exact against ffmpeg / vgmstream (tools/fixtures/adpcm.py), with seeking; our encoder's
|
||||
-- streams (ima, ms, ima_wav) as ffmpeg decodes them (wrapped in KVAG / WAV in the fixture step) against our decode of
|
||||
-- the same bytes, and their quality; options and errors; the api by format name; the fuzz pass.
|
||||
-- audio/adpcm tests: headerless ADPCM streams bit-exact against ffmpeg / vgmstream; our encoder's via ffmpeg.
|
||||
-- Fixtures: tools/fixtures/adpcm.py.
|
||||
local T = require("@tests/T")
|
||||
local Raw = require("@rosetta/audio/adpcm")
|
||||
local Bytes = require("@rosetta/core/Bytes")
|
||||
@@ -47,7 +45,6 @@ for _, c in Cases do
|
||||
end
|
||||
t:note("%d raw streams bit-exact with ffmpeg / vgmstream", #Cases)
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ encoder
|
||||
local function snr(x: buffer, y: buffer, count: number): number
|
||||
local sig, err = 0, 0
|
||||
for i = 0, count - 1 do
|
||||
@@ -100,7 +97,6 @@ do
|
||||
t:check(lo.frames == 6 and buffer.tostring(lo.samples) == buffer.tostring(hi.samples), "nibble order")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ api
|
||||
do
|
||||
local c = Cases[1]
|
||||
local a, err = F.audio.load(c.data, { format = "adpcm", codec = c.codec, sampleRate = c.rate, channels = c.ch })
|
||||
@@ -110,7 +106,6 @@ do
|
||||
t:check(out ~= nil and buffer.len(out) % 256 == 0, "F.save adpcm")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ fuzz
|
||||
local kinds = { "ima", "ima_wav", "ms", "ima_qt", "psx" }
|
||||
local k = 0
|
||||
t:fuzz("open + read + seek", function(b: buffer)
|
||||
|
||||
Reference in new issue
Block a user