fix: pass decoded audio data to playSingleSound function

This commit is contained in:
2025-06-16 20:34:22 -04:00
parent 48dfa77350
commit adad0e8557

View File

@@ -31,13 +31,14 @@ local function playSound(speaker, fileName)
local fileStream = getFileName(fileName) local fileStream = getFileName(fileName)
local values = io.lines(fileStream, 16 * 1024) local values = io.lines(fileStream, 16 * 1024)
local data = values.readAll()
local speakers = table.pack(peripheral.find("speaker")) local speakers = table.pack(peripheral.find("speaker"))
local tasks = {} local tasks = {}
for i = 1, speakers.n do for i = 1, speakers.n do
tasks[i] = function() tasks[i] = function()
playSingleSound(speakers[i], values) playSingleSound(speakers[i], data)
end end
end end