tests/audio: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:51:26 -05:00
1 parent 75ddfb4068
commit 0eec255bfb
30 files changed
+66 -244

No files matched your search

+1 -8
View File
@@ -1,6 +1,4 @@
-- audio/aac tests: ADTS streams from ffmpeg and fdkaac (stereo, mono 32 kHz) against ffmpeg's float decode (SNR,
-- length); an HE-AAC ADTS stream plays its core; a leading ID3v2 tag (skipped, text frames as tags) and garbage before
-- the first frame (resync); a truncated last frame; streaming + seek; sniff; errors; the fuzz no-throw pass.
-- audio/aac tests: ADTS streams from ffmpeg and fdkaac against ffmpeg's float decode (SNR, length).
-- Fixtures: tools/fixtures/m4a.py.
local T = require("@tests/T")
local AacF = require("@rosetta/audio/aac")
@@ -49,7 +47,6 @@ for _, c in Fx do
t:note("%s: %d ch %d Hz, %d frames, SNR %.1f dB vs ffmpeg", c.name, c.channels, c.rate, a.frames, s)
end
-- HE-AAC ADTS: the core
for _, c in He do
if string.sub(c.name, -4) == ".aac" then
local a, err = AacF.decode(reader(c.data))
@@ -57,7 +54,6 @@ for _, c in He do
end
end
-- ID3v2 in front + garbage, truncated tail
do
local function frame(id: string, text: string): string
local body = "\3" .. text
@@ -77,7 +73,6 @@ do
t:check(cut and cut.frames == first.frames - 1024, "truncated last frame dropped")
end
-- streaming + seek
do
local whole = AacF.decode(reader(first.data)) :: any
local dec = AacF.open(reader(first.data)) :: any
@@ -94,14 +89,12 @@ do
end
end
-- errors
do
t:eq(AacF.sniff(reader("RIFF....WAVE")), 0, "sniff a WAV")
local _, e = AacF.decode(reader(string.rep("\0", 100)))
t:check(e and e.code == Err.CORRUPT, "no frames: " .. tostring(e))
end
-- fuzz
do
local samples = {}
for _, c in Fx do