blob: 3de11953ae5165db86c2fea8fe5eeeb9ed4d3876 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
local channel = 8888
local radio = peripheral.find"radio_tower"
local speaker = peripheral.find"speaker"
assert(radio and speaker, "aaa")
radio.setFrequency(channel)
local channel_format = string.rep("b",48000)
while true do
local _,_,data = os.pullEvent"radio_message"
assert(#data == 48000,"weird format")
speaker.playAudio(string.unpack(channel_format,data))
end
|