ws-audio2: merge ws/audio2-lossy (Musepack SV7/SV8, AC-3, AudioWrap AC-3 hook)

This commit is contained in:
4DBug committed 2026-10-31 14:57:05 -05:00
commit 39da2f6648
25 files changed
+4196 -4

No files matched your search

+28
View File
@@ -1099,3 +1099,31 @@ do
end
end
end
-- ws-audio2: lossy
do
-- Musepack (codecs/audio/Musepack) SV8 / SV7 and AC-3 5.1 (codecs/audio/Ac3): whole-file decodes, MB/s of f32 output
-- (tools/fixtures/mpc.py: 1.2 s of 44.1 kHz stereo at quality 5; tools/fixtures/ac3.py: 0.16 s of 48 kHz 5.1 at
-- 448 kbps, decoded 4 times per run)
local Mpc = require("@formats/audio/mpc")
local MpcFx = require("@tests/gen/mpc_cases")
local Ac3F = require("@formats/audio/ac3")
local Ac3Fx = require("@tests/gen/ac3_cases")
for _, c in MpcFx do
if c.name == "sv8_q5_stereo" or c.name == "sv7_q5_stereo" then
local b = buffer.fromstring(c.data)
bench("mpc " .. c.name, 5, c.frames * c.channels * 4, function()
assert(Mpc.decode(Bytes.reader(b)))
end)
end
end
for _, c in Ac3Fx do
if c.name == "5.1_448" then
local b = buffer.fromstring(c.data)
bench("ac3 5.1 448 kbps", 5, c.frames * c.channels * 4 * 4, function()
for _ = 1, 4 do
assert(Ac3F.decode(Bytes.reader(b)))
end
end)
end
end
end