fix: pass decoded audio data to playSingleSound function
This commit is contained in:
@@ -31,13 +31,14 @@ local function playSound(speaker, fileName)
|
||||
|
||||
local fileStream = getFileName(fileName)
|
||||
local values = io.lines(fileStream, 16 * 1024)
|
||||
local data = values.readAll()
|
||||
|
||||
local speakers = table.pack(peripheral.find("speaker"))
|
||||
local tasks = {}
|
||||
|
||||
for i = 1, speakers.n do
|
||||
tasks[i] = function()
|
||||
playSingleSound(speakers[i], values)
|
||||
playSingleSound(speakers[i], data)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user