Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speaker = peripheral.find("speaker")
- local MID = 1
- function SongPlayer(input)
- while not speaker.playAudio(input) do
- os.pullEvent("speaker_audio_empty")
- end
- end
- rednet.open("top")
- while true do
- local id, message = rednet.receive(Protocol)
- if id == MID then
- SongPlayer(textutils.unserialize(message))
- os.pullEvent("speaker_audio_empty")
- end
- end
Add Comment
Please, Sign In to add comment