tests/codecs (a-m): comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:19 -05:00
1 parent a80299dce0
commit 5f7f6005f6
24 files changed
+46 -181

No files matched your search

+2 -7
View File
@@ -1,7 +1,5 @@
-- codecs/audio/Alac tests: encoder -> decoder round trips over silence (zero runs), full-scale noise (uncompressed frames),
-- tones, steps, 1 - 8 channels, 16 / 20 / 24 bits, partial and tiny frames, custom frame lengths; ffmpeg's ALAC
-- packets (through containers/IsoBmff) decode to the source integers; the magic cookie (plain, behind frma / alac atoms,
-- bad versions / depths); errors; the fuzz no-throw pass on packets. Fixtures: tools/fixtures/m4a.py.
-- codecs/audio/Alac tests: encoder -> decoder round trips, ffmpeg's ALAC packets, the magic cookie, errors.
-- Fixtures: tools/fixtures/m4a.py.
local T = require("@tests/T")
local Alac = require("@rosetta/codecs/audio/Alac")
local IsoBmff = require("@rosetta/containers/IsoBmff")
@@ -97,7 +95,6 @@ roundTrip("identical channels", 2, 16, 5000, function(i)
return math.floor(math.sin(i * 0.02) * 20000)
end)
-- ffmpeg's packets
for _, c in Fx do
if c.container == "m4a" then
local r = Bytes.reader(buffer.fromstring(c.data))
@@ -120,7 +117,6 @@ for _, c in Fx do
end
end
-- the cookie behind QuickTime atoms, bad cookies
do
local enc = Alac.encoder({ sampleRate = 48000, channels = 2 }) :: Alac.Encoder
local plain = Alac.cookie(enc.config)
@@ -149,7 +145,6 @@ do
t:check(e5 and e5.code == Err.CORRUPT, "bad packet: " .. tostring(e5))
end
-- fuzz the packet decoder
do
local enc = Alac.encoder({ sampleRate = 44100, channels = 2, bitDepth = 16 }) :: Alac.Encoder
local src = table.create(2 * 3000, 0)