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,4 @@
|
||||
-- audio/opus encoder tests (the CELT-only writer, ws-m4a; mono and mid / side stereo): our Ogg Opus files (re-encoded here, compared with the bytes
|
||||
-- checked in the fixture step) decode in libopus' opusdec to the input's exact length (pre-skip + end trimming) with a
|
||||
-- minimum SNR, opusinfo finds no problem, ffmpeg reads them, OpusTags carry the tags; our decoder agrees with opusdec;
|
||||
-- resampled 44.1 kHz input; silence frames; streaming input; errors; a fuzz no-throw pass over our files.
|
||||
-- audio/opus encoder tests (CELT-only): our Ogg Opus decodes in opusdec to the input's exact length, opusinfo-clean.
|
||||
-- Fixtures: tools/fixtures/opus_celt.py.
|
||||
local T = require("@tests/T")
|
||||
local Opus = require("@rosetta/audio/opus")
|
||||
@@ -46,7 +43,6 @@ for _, c in Cases.list do
|
||||
local ch = c.channels
|
||||
t:eq(#fx.opusdec // (4 * ch), frames48, c.name .. ": opusdec length = the input's (pre-skip + end trimming)")
|
||||
t:eq(fx.ffmpegFrames, frames48, c.name .. ": ffmpeg length")
|
||||
-- our decoder vs opusdec
|
||||
local ours = Opus.decode(Bytes.reader(file :: buffer)) :: any
|
||||
t:eq(ours.frames, frames48, c.name .. ": our decoder's length")
|
||||
local ref = buffer.fromstring(fx.opusdec)
|
||||
@@ -66,7 +62,6 @@ for _, c in Cases.list do
|
||||
end
|
||||
end
|
||||
|
||||
-- silence frames decode to silence
|
||||
do
|
||||
local c = Cases.list[1]
|
||||
local ref = buffer.fromstring(byName[c.name].opusdec)
|
||||
@@ -77,7 +72,6 @@ do
|
||||
t:check(peak < 1e-3, "digital silence stays silent (peak " .. peak .. ")")
|
||||
end
|
||||
|
||||
-- a streaming decoder as the input
|
||||
do
|
||||
local c = Cases.list[1]
|
||||
local dec = Opus.open(Bytes.reader(files[1] :: buffer)) :: any
|
||||
@@ -90,7 +84,6 @@ do
|
||||
t:check(kb ~= nil and buffer.tostring(kb :: buffer) == buffer.tostring(again :: buffer), "bitrate 64 = 64000 bit/s")
|
||||
end
|
||||
|
||||
-- errors
|
||||
do
|
||||
local three = Cases.signal({ rate = 48000, channels = 3, seconds = 0.05 })
|
||||
local _, e = Opus.encode(three)
|
||||
@@ -101,7 +94,6 @@ do
|
||||
t:check(e3 and e3.code == Err.ARG, "not audio")
|
||||
end
|
||||
|
||||
-- fuzz the decoder over our files
|
||||
do
|
||||
local samples = {}
|
||||
for i, f in files do
|
||||
|
||||
Reference in new issue
Block a user