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.