mirror of
https://github.com/kepler155c/opus
synced 2024-12-25 16:10:26 +00:00
stereo sound!
This commit is contained in:
parent
02b12d87dc
commit
aef22987fa
@ -5,10 +5,9 @@ local Sound = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Sound.play(sound, vol)
|
function Sound.play(sound, vol)
|
||||||
local speaker = peripheral.find('speaker')
|
peripheral.find('speaker', function(_, s)
|
||||||
if speaker then
|
s.playSound('minecraft:' .. sound, vol or Sound._volume)
|
||||||
speaker.playSound('minecraft:' .. sound, vol or Sound._volume)
|
end)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Sound.setVolume(volume)
|
function Sound.setVolume(volume)
|
||||||
|
@ -46,7 +46,7 @@ end
|
|||||||
local Manager = class()
|
local Manager = class()
|
||||||
function Manager:init()
|
function Manager:init()
|
||||||
self.devices = { }
|
self.devices = { }
|
||||||
_G._pp = self
|
|
||||||
local function keyFunction(event, code, held)
|
local function keyFunction(event, code, held)
|
||||||
local ie = Input:translate(event, code, held)
|
local ie = Input:translate(event, code, held)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user