CC: Jukebox lets ComputerCraft computers broadcast music from a playing jukebox to remote CC speakers.
Listeners join at the current point in the song. Removing the disc stops playback.
- Includes a ready-to-use
jukebox_radioprogram - Broadcast to multiple receiving computers
- Designed for server-side installation or singleplayer
Run jukebox_radio broadcast on a computer beside the jukebox, then jukebox_radio receive <sender-ID> on a computer with a speaker. Both computers need modems.
Lua API
Find a connected jukebox with peripheral.find("jukebox"). Direct connections and wired modem networks are supported.
hasRecord()- checks whether a disc is inserted.isPlaying()- checks whether the jukebox is playinggetRecord()- returns the disc’s item ID, sound ID, title, duration, playback state, and elapsed timereadAudio(cursor?, token?)- reads audio chunks from the current playback position
readAudio() returns a table with a status: loading, audio, waiting, stopped, ended, or error. Audio results include audio, token, cursor, and next. Pass next and token into the following call to continue smoothly.
Audio is a binary string of 48 kHz mono PCM bytes. Convert each byte with audio:byte(i) - 128 before passing the sample table to speaker.playAudio(). Custom programs can relay these chunks over Rednet.
Ready-made radio commands
jukebox_radio broadcast
jukebox_radio receive <senderComputerID> [volume]
jukebox_radio local
Receivers join the current part of the song. The jukebox and participating computers must remain loaded.

