1
0
mirror of https://github.com/kepler155c/opus synced 2024-12-24 23:50: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)
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)

View File

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