This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Creeper9207's profile picture

CC SOUND [Not a mod] Mp3s in CC

Started by Creeper9207, 22 September 2015 - 03:10 AM
Creeper9207 #1
Posted 22 September 2015 - 05:10 AM
So, i made a Sound driver for computercraft in cc, it's pretty straightforward, and a bit buggy as well :P/>

Here's an example usage:

os.loadAPI("soundapi")
soundapi.play("http://66.90.91.26/ost/mario-kart-7-original-soundtrack/kagkxswsui/11-music-park-melody-motorway-.mp3")

And the pastebin:
http://pastebin.com/1bvNa7E2

Link:
http://creepertech.net/ccsound.zip

Here are the directions for linux/mac:
You can just double click the jar to open it, but you will have to force close it, opening with the terminal is reccomended.
Download the zip to the desktop, then extract, then go into the terminal and navigate to "Desktop/ccsound"
Now execute the following command: java -jar ccsound.jar
(do this every time you restart your computer, or after you close it to open it again)
Windows directions:
Extract the zip to the desktop, and execute ccsound.bat
(do this every time you restart your computer, or after you close it to open it again)
Sadly, there is no stop function, yet, and maybe soon you will be able to play it by text instead of URL.

What are the advantages?
1. It doesn't error if the sound driver program is not installed
2. It may be used with emulators
3. no peripherals required
Edited on 22 September 2015 - 03:15 AM
Luca_S #2
Posted 01 October 2015 - 04:44 PM
Isn't this just a java applications that listens on port 810 removes the GET / before the command downloads the url and plays it?
Luca_S #3
Posted 01 October 2015 - 04:56 PM
And why is the program starting LOTS of new threads?
negamartin #4
Posted 02 October 2015 - 07:32 PM
Yes, it is just a java application listening for http GETs. Quite clever, so I dont see why you criticize it. You didnt have this idea before.

Very elegant solution to the lack of sound.
Luca_S #5
Posted 02 October 2015 - 08:03 PM
The idea is clever, but the main thing i am asking myself right know is why it is starting thousands of new threads
Edited on 02 October 2015 - 06:03 PM
Creeper9207 #6
Posted 04 October 2015 - 04:59 AM
I'll have to look into that, thanks for reporting
Creeper9207 #7
Posted 04 October 2015 - 06:24 AM
How exactly did you know it was spawning threads?
H4X0RZ #8
Posted 04 October 2015 - 09:13 AM
How exactly did you know it was spawning threads?
I guess he looked at the source?
Creeper9207 #9
Posted 05 October 2015 - 03:33 AM
if you can look at the source, and see that there is a bug, and what it is, you must be superman.
Yarillo #10
Posted 07 October 2015 - 08:48 PM
Now execute the following command: java -jar ccsound.jar

What does it do ?
FUNCTION MAN! #11
Posted 07 October 2015 - 08:59 PM
if you can look at the source, and see that there is a bug, and what it is, you must be superman.

No, you're just able to understand basic code.
H4X0RZ #12
Posted 08 October 2015 - 12:53 AM
if you can look at the source, and see that there is a bug, and what it is, you must be superman.

No, you're just able to understand basic code.

I guess he was more like "OMG someome can read compiled Java code and detect bugs in there!!11!!!one!!eleven"
Creeper9207 #13
Posted 08 October 2015 - 03:31 AM
you could see with ease it is making threads, what im trying to figure out is if Luca meant it when he/she said "thousands" of threads

if you can look at the source, and see that there is a bug, and what it is, you must be superman.

No, you're just able to understand basic code.

I guess he was more like "OMG someome can read compiled Java code and detect bugs in there!!11!!!one!!eleven"
That's offensive on !!11!!!one!!eleven levels.
クデル #14
Posted 08 October 2015 - 08:18 AM
Would this work, if I changed the port and port forwarded that particular port?
Bomb Bloke #15
Posted 08 October 2015 - 09:53 AM
"It depends", "probably not", and "there's a better way to do whatever it is you're actually trying to do".
Creeper9207 #16
Posted 08 October 2015 - 10:59 PM
why would you port forward?