1
0
mirror of https://github.com/kepler155c/opus synced 2024-12-25 16:10:26 +00:00

stereo sound!

This commit is contained in:
kepler155c@gmail.com 2019-01-02 23:56:01 -05:00
parent 02b12d87dc
commit aef22987fa
2 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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)