uses the FMOD
to handle sound.
When sound files are uploaded to SL
they are encoded from the WAV PCM format
to the Ogg Vorbis
format. Even though sounds are streamed, the client
will not start playback until it has completely downloaded the sound file (because the client decodes them back into WAV files). The maximum length of a file is 10 seconds. Sounds are always sampled at 44.1KHz, 16-bit
, mono (stereo files will have one channel dropped--merged (as in combined)
--when uploading). The bitrate of the encoded sample is selected when uploading and can be between 32, 64, 96 or 128kbps. Sounds are played at some specified volume
Q: How do I play an MP3?
A1: You can stream audio on your land using llSetParcelMusicURL. You can read more about the limitations of this at the llSetParcelMusicURL page.
A2: If you want to upload a song to play in SL without streaming it directly, you can do this, but you may run into some problems. First of all, you're limited to less than 10 seconds per track. Presumably, the Lindens' reasoning for this is that it's easier to just avoid copyright disputes than to attempt to police them, but it's possible that there's a technical limit for it as well. (Beyond "we don't want you filling up our servers", that is.) Note: when songs or other audio files are cut into 10 second clips, most scripts lack the ability to link them seamlessly.
Q: Why not just play them as OGGs?
A: Because mosts sounds are played more then once, and it's CPU-intensive to decode them multiple times; by caching the intermediate WAV stream it saves CPU time. The vast majority of soundcards on the market can only handle WAV streams, meaning that the audio has to be decoded first.
There are various 'jukebox' scripts available that are designed to play a sliced-up song's segments in order. To create the sound inventory items needed, break up the MP3 into 10-second clips (GoldWave is a useful utility for this--it can do it automatically via its "cue points" tool), then upload them. Unfortunately, uploading songs like this can be costly. Expect to spend hundreds of L$ per song.
Do note, that it's Ogg Vorbis - not Ogg- when referring to the audio format and Ogg when referring to the container format, as described on Vorbis.com