mirror of
https://github.com/kepler155c/opus
synced 2024-12-24 15:40: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)
|
||||
local speaker = peripheral.find('speaker')
|
||||
if speaker then
|
||||
speaker.playSound('minecraft:' .. sound, vol or Sound._volume)
|
||||
end
|
||||
peripheral.find('speaker', function(_, s)
|
||||
s.playSound('minecraft:' .. sound, vol or Sound._volume)
|
||||
end)
|
||||
end
|
||||
|
||||
function Sound.setVolume(volume)
|
||||
|
@ -46,7 +46,7 @@ end
|
||||
local Manager = class()
|
||||
function Manager:init()
|
||||
self.devices = { }
|
||||
_G._pp = self
|
||||
|
||||
local function keyFunction(event, code, held)
|
||||
local ie = Input:translate(event, code, held)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user