Testing...

This commit is contained in:
2017-06-30 22:21:18 -04:00
parent 6f18a129f1
commit 943afd438a
7 changed files with 30 additions and 32 deletions
Binary file not shown.
Binary file not shown.
@@ -1,32 +0,0 @@
local GLOBAL,sThread=require("multi.integration.lanesManager").init()
require("proAudioRt") -- an audio library
-- The hosting site with precompiled binaries is down, but here is a link to a archive
-- https://web.archive.org/web/20160907180559/http://viremo.eludi.net:80/proteaAudio/proteaaudiolua.html documentation and downloads are availiable... I also have saved copies just in case :D
-- Music by: myuuji
-- His youtube channel can be found here: https://www.youtube.com/channel/UCiSKnkKCKAQVxMUWpZQobuQ
proAudio.create()
multi:newThread("test",function()
-- simple playlist
sThread.waitFor("song")
print("Playing song 1!")
proAudio.soundPlay(GLOBAL["song"])
sThread.waitFor("song2")
thread.hold(function() sThread.sleep(.001) return proAudio.soundActive()==0 end)
print("Playing song 2!")
proAudio.soundPlay(GLOBAL["song2"])
sThread.waitFor("song3")
thread.hold(function() sThread.sleep(.001) return proAudio.soundActive()==0 end)
print("Playing song 3!")
proAudio.soundPlay(GLOBAL["song3"])
end)
-- loading the audio in another thread is way faster! So lets do that
multi:newSystemThread("test1",function() -- spawns a thread in another lua process
require("proAudioRt")
GLOBAL["song"]=proAudio.sampleFromFile("test.ogg",1,1)
print("Loaded song 1!")
GLOBAL["song2"]=proAudio.sampleFromFile("test2.ogg",1,1)
print("Loaded song 2!")
GLOBAL["song3"]=proAudio.sampleFromFile("test3.ogg",1,1)
print("Loaded song 3!")
end)
multi:mainloop()
Binary file not shown.
Binary file not shown.
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
package = "multi"
version = "1.8-2"
source = {
url = "git://github.com/rayaman/multi.git",
tag = "v1.8.2",
}
description = {
summary = "Lua Multi tasking library",
detailed = [[
This library contains many methods for multi tasking. From simple side by code using multi objs, to using coroutine based Threads and System threads(When you have lua lanes installed or are using love2d. Optional)
]],
homepage = "https://github.com/rayaman/multi",
license = "MIT"
}
dependencies = {
"lua >= 5.1, < 5.4"
}
build = {
type = "builtin",
modules = {
-- Note the required Lua syntax when listing submodules as keys
["multi.init"] = "mulit/mulit/init.lua",
["multi.all"] = "mulit/mulit/all.lua",
["multi.compat.backwards[1,5,0]"] = "mulit/mulit/compat/backwards[1,5,0].lua",
["multi.compat"] = "mulit/mulit/compat/love2d.lua",
["multi.integration.lanesManager"] = "mulit/mulit/integration/lanesManager.lua",
["multi.integration.loveManager"] = "mulit/mulit/integration/loveManager.lua",
["multi.integration.shared.shared"] = "mulit/multi/integration/shared/shared.lua"
}
}