ws-audio2: docs/guide/music.md: the other tracker formats (table rows, Module.engine, More tracker formats with tested snippets; docs_av inputs mtm / med / umx); bench: render 669 / med
This commit is contained in:
1 parent
26fa887370
commit
0a7b74ec49
3 files changed
+87
-5
No files matched your search
@@ -1078,3 +1078,29 @@ do
|
||||
jitTune(false)
|
||||
end
|
||||
end
|
||||
-- ws-audio2: trackers
|
||||
do
|
||||
-- the other tracker loaders on the shared engine: a 669 (Hz periods, auto slides) and an MMD1 (hold / decay
|
||||
-- envelopes, instruments) from tools/fixtures/{669,med}.py, decoded and rendered at 44.1 kHz
|
||||
local Six69 = require("@formats/music/669")
|
||||
local Med = require("@formats/music/med")
|
||||
local songs = { { Six69, require("@tests/gen/669_cases")[1].data }, { Med, require("@tests/gen/med_cases")[2].data } }
|
||||
local best, frames = math.huge, 0
|
||||
local out = buffer.create(4096 * 8)
|
||||
for _ = 1, 3 do
|
||||
frames = 0
|
||||
local t0 = os.clock()
|
||||
for _, s in songs do
|
||||
local dec = (s[1].decode(Bytes.reader(buffer.fromstring(s[2]))) :: any):render()
|
||||
while true do
|
||||
local _, n = dec:read(4096, out)
|
||||
if n == 0 then
|
||||
break
|
||||
end
|
||||
frames += n
|
||||
end
|
||||
end
|
||||
best = math.min(best, os.clock() - t0)
|
||||
end
|
||||
print(string.format("%-8s %-30s %8.2f ms %7.1f x realtime", runtime, "render 669 / med", best * 1000, frames / 44100 / best))
|
||||
end
|
||||
Reference in new issue
Block a user