From cdaa2c210dbc5be4262378624df48ee94901fc73 Mon Sep 17 00:00:00 2001 From: hkc Date: Mon, 18 Dec 2023 18:29:28 +0300 Subject: [PATCH] You just call it apparently --- stream.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream.lua b/stream.lua index 5e0423b..e2504d6 100644 --- a/stream.lua +++ b/stream.lua @@ -27,7 +27,7 @@ for i = 1, buffer_size do buffer[i] = 0 end -local decoder = dfpwm.make_decoder() +local decode = dfpwm.make_decoder() while true do local chunk = req.read(buffer_size) if not chunk then @@ -39,7 +39,7 @@ while true do -- buffer[i] = string.byte(chunk, i) - 128 --end - local buffer = decoder.decode(chunk) + local buffer = decode(chunk) while not speaker.playAudio(buffer) do os.pullEvent("speaker_audio_empty")