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

AUDIO

Started by raacer, 02 November 2012 - 12:51 PM
raacer #1
Posted 02 November 2012 - 01:51 PM
i have a few ideas for audio

1)internet radio
-access internet radio url's to play on computer
-would be great on multi player
2)access win media player or just open music folder
-play music in game
-really great for multi player (this would be hard to do though :D/>/>
3)speakers
-have external speakers that could be placed in room
-use red stone to connect or other idea
-wireless upgrade
-3D surround

note
i looked for this suggestion but couldn't find it if its already there post a link here and i will delete this.
zeekkay #2
Posted 02 November 2012 - 05:03 PM
All of this would put a heavy burden on SMP servers. I don't think Minecraft supports surround sound. If that's true then the 3D surround would be impossible.
Jasonfran #3
Posted 02 November 2012 - 11:22 PM
3D surround isn't impossible
waffles05 #4
Posted 03 November 2012 - 01:25 AM
Minecraft does support surround sound
Dlcruz129 #5
Posted 04 November 2012 - 12:22 PM
Well, the problem with audio is multiplayer. Minecraft is not allowed to download from the server. The client would have to have the sounds installed. Check out my post: Sound (different). I'm on my phone so I can't link, do a search.
NeverCast #6
Posted 04 November 2012 - 12:39 PM
I don't see why the client cannot download from the server, that is what the plugin/mod packet is for,
That said, it's a lot of bandwidth. but very possible indeed.
Dlcruz129 #7
Posted 04 November 2012 - 04:04 PM
I don't see why the client cannot download from the server, that is what the plugin/mod packet is for,
That said, it's a lot of bandwidth. but very possible indeed.

The client has never been able to download from the server. Most likely for security reasons. (Downloading Trojan.exe from virusserver.com:25565 :D/>/>)
Jasonfran #8
Posted 07 November 2012 - 06:51 AM
There are rumors that Mojang are working on a system that downloads files from the server similar to how Valves Source engine games works like Garrys mod, counter strike and tf2
Sammich Lord #9
Posted 07 November 2012 - 08:38 AM
Well the thing is that, it will be possible to just play normal minecraft sound and music(since it is already installed on the client). However, if it is custom audio from the server, that is a different story. First off, it will use a lot of bandwidth and causes more CPU usage and also be a security risk. Dan and Cloudy do not want to add anything if it causes a security risk.
Jasonfran #10
Posted 07 November 2012 - 11:11 AM
You just limit what files can be downloaded. Just limit it to a .mp3 file or something.
Sammich Lord #11
Posted 07 November 2012 - 11:30 AM
You just limit what files can be downloaded. Just limit it to a .mp3 file or something.
It still costs bandwidth and CPU usages. You can also just rename a file to "virus.mp3" and the game will try to run it and it will install a virus.
PixelToast #12
Posted 07 November 2012 - 11:52 AM
You just limit what files can be downloaded. Just limit it to a .mp3 file or something.
You can also just rename a file to "virus.mp3" and the game will try to run it and it will install a virus.
are you #$%&ing kidding, you cant put a virus in an mp3 file
* PixelToast slaps Human
ChunLing #13
Posted 07 November 2012 - 12:19 PM
Well…it depends on how the player works. But it certainly isn't easy even when you have a player that has an identifiable vulnerability.
PixelToast #14
Posted 07 November 2012 - 12:36 PM
Well…it depends on how the player works. But it certainly isn't easy even when you have a player that has an identifiable vulnerability.
so your suggesting its possible for a mp3 to raw plugin to allow code injection? thats not how it works!
Jasonfran #15
Posted 07 November 2012 - 08:51 PM
Source engine games download hundreds of MP3 files from servers. Not one has been a virus
chiloxsan #16
Posted 07 November 2012 - 09:33 PM
Maybe if we could beep, specifying the frequency and the duration, like in QBASIC.
Shnupbups #17
Posted 08 November 2012 - 06:17 PM
AUDIO AIN'T GONNA HAPPEN! Look in the 'suggestions NOT to make' thread (it's pinned).
ChunLing #18
Posted 08 November 2012 - 06:50 PM
It's always possible for there to be a vulnerability that allows something that should be treated as data to instead run as code. It actually used to be quite common, but is far less so nowadays.

Nowadays, an mp3 player that would ever allow data to be executed is probably malware specifically designed to permit this. Malware video players are rather more common than audio players, but both exist.

"Better" malware support is probably not on the list of things CC is going to introduce anytime soon, though.
Cruor #19
Posted 08 November 2012 - 06:55 PM
AUDIO AIN'T GONNA HAPPEN! Look in the 'suggestions NOT to make' thread (it's pinned).
Stop stealing my job :P/>/> but be reasonable, how can this topic look at a pinned topic that is made 3 days after it?
Shnupbups #20
Posted 08 November 2012 - 06:59 PM
Stop stealing my job :P/>/> but be reasonable, how can this topic look at a pinned topic that is made 3 days after it?
I'm not stealing it! I'm borrowing it! I'll give it back next week, I promise!

On topic: I don't normally look at dates, so I overlooked that. They can still change the topic title so it says '[Denied] Audio' or something like that though. Or someone else could have pointed it out when that post was made (yes, that is your job. We wouldn't steal it if you did it).
PixelToast #21
Posted 08 November 2012 - 08:53 PM
Maybe if we could beep, specifying the frequency and the duration, like in QBASIC.
i wub qbasic, exept when someone requested for you to make minecraft and your like *tableFlip* after 30 seconds of thinking about how to do it
raacer #22
Posted 09 November 2012 - 09:33 AM
this flared more than i had thought.
after "skimming" through comments, i do want to clarify some things.

-i DID say that using a media player would be hard to integrate and i understand the download rules tho also note that it is possible to download from server as spout craft has proven.

-also mine craft fully supports 3D surround as anyone who has used 3D headphones or better a 3D stereo and had a creeper come up behind you.

- lastly there are PLUGINS or server mods that do the internet radio part so it is able to be done.
Leo Verto #23
Posted 09 November 2012 - 10:39 AM
Source engine games download hundreds of MP3 files from servers. Not one has been a virus
How would you be able to know that? Also Valve is a big company with a lot of money to program security mechanisms, CC is developed by two non-paid developers and a community.

-i DID say that using a media player would be hard to integrate and i understand the download rules tho also note that it is possible to download from server as spout craft has proven.

- lastly there are PLUGINS or server mods that do the internet radio part so it is able to be done.
All those plugins depend on Spoutcraft, which is a combination of a heavily modified client and a powerful server plugin, trying to do that using a single mod (which is actually about something completely different) is a lot of work coding the transmission and opening an exploit, which can be used to infect player's computers, who just joined a single server.
raacer #24
Posted 09 November 2012 - 12:58 PM
actually internet stream does not require spout :unsure:/>/> it is a normal plugin and as far as viruses
1) if you are accessing the internet with out security you are an idiot and deserve a virus
2) you cant send a virus over internet stream files
and finally if the open stream data file is disabled by default then you don't have to worry.
Mandrake Fernflower #25
Posted 09 November 2012 - 01:37 PM
I would think just by adding RichardG's iron noteblock mod into default CC would be enough of an audio system for most people
immibis #26
Posted 09 November 2012 - 03:29 PM
You could download your virus.exe to the client by renaming it to virus.mp3 and trying to play it, but then you'd have to trick the client into running it as an EXE file. Just having a virus sitting there with a .mp3 extension is harmless, and when you try to play it, your MP3 player won't do anything since it's not a valid MP3 file.
basdxz #27
Posted 09 November 2012 - 09:19 PM
*Imagines joining a server and hearing people yelling.* I like this idea, my radio will finally work as it should! :unsure:/>/>
NeverCast #28
Posted 09 January 2013 - 07:35 AM
MP3 files cannot have viruses, as it's a standardized ( and de facto standard ) audio format. It doesn't need any special software to play it, that is why your cheap MP3 players are _MP3_ players. Simple but effective lossy format. Viruses have and can be integrated in to WMA files by leveraging the Codec request ability of WMA ( WMA file tells Windows Media Player, Hey I need this software to play because I'm 'special' and Windows Media Player downloads and installs it.)

Also yes: MP3 is a standard but it's also a little outdated, and in some cases you need a licence or to follow a certain licence when using it, which would mean you'd have to ship that around with your Mod.
There is one lossy format that has gained a LOT of popularity and is used as the default format from iTunes to Cell Phones, Playstations and In Car Stereos.. AAC!

AAC achieves better quality at close to equal bitrates with MP3, which means you use less bandwidth, to make the same sound. Much better for a MC Mod, and there are libraries everywhere for it. This format also has 0 chance of viruses.

There is one thing you're overlooking, the complexity of it all, Not saying it's impossible, just saying it's bloody hard. You also wouldn't be able to stream the sound from the server, Servers like SoundCast use enough CPU just transcoding in real time and sending to several people, imagine if the server had to mix together different sounds with different volumes and 'spacial effects' for each player on the server, and send the sound to them with minimal delay. Not likely possible without severely impairing the actual gaming experience with lag and other latency such as bandwidth saturation.

Best bet would be to pre-load the files on to the client machine, and then play them how you would normally, by name with x,y,z coords. OpenAL will take care of all the sound for you.

There is one thing I've not mentioned regarding all this, AAC and MP3 are Compressed Formats, which means they have to be decompressed before they can be played, and this will tax your processor more than Minecraft already does. The best format to use would be the one that MC already uses, OGG, OGG comes in both compressed and uncompressed, lossy and lossless, and I couldn't tell you what combination MC files are without opening them up and having a look. But what I can tell you is that they are completely free licence, so you can distribute them around the internet to your hearts content without ever once giving a damn about who might tell you off for it!

So my conclusion if you want to play sounds on the client from the server.
* Pre load them to the client
* Use OpenAL
* Use Ogg format

In regards to speech, which I didn't mention at all in this post, you can use a decendent OGG format, Speex, there is already JSpeex which is a Java Implementation of the format, with both encoder and decoder. could be a possibility.

Anyway, I've said my bit, I think it's an amazing idea, but just a little difficult to implement and do correct.
P.S Only now do I realize this topic is 2 months stale. But I've already written my reply.