Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local encoder = dfpwm.make_encoder()
- local decoder = dfpwm.make_decoder()
- local callback_onframe = callback_onframe or function()end
- local out = fs.open(output, "wb")
- for input in io.lines(input, 16 * 1024 * 2) do
- local decoded = decoder(input)
- local output = {}
- for i = 1, #decoded, 2 do
- local value_1, value_2 = decoded[i], decoded[i + 1]
- output[(i + 1) / 2] = (value_1 + value_2) / 2
- end
- out.write(encoder(output))
- callback_onframe()
- sleep(0)
- end
- out.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement