Marlingaming

CC Tweaked Wireless Speaker Sender Program

Feb 23rd, 2022 (edited)
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. local tArg = {...}
  2. local Songs = {}
  3.  
  4.  
  5. function SongPlayer(I)
  6. local dfpwm = require "cc.audio.dfpwm"
  7. local decoder = dfpwm.make_decoder()
  8. local speaker = peripheral.find("speaker")
  9. for input in io.lines(Songs[I], 16 * 1024) do
  10. local decoded = decoder(input)
  11. rednet.broadcast(textutils.serialize(decoded))
  12. end
  13. end
  14.  
  15. rednet.open()
  16. SongPlayer(tArg[1])
Add Comment
Please, Sign In to add comment