Page 1 of 1

Sounds and ULM

PostPosted: Sat Jan 26, 2008 10:12 pm
by Robert The Rebuilder
When the next version of ULM that supports sounds is released, we should consider the problem of the large size of the WAV files. An OGG file can be 2 MB, but its WAV counterpart can be 32 MB.

Perhaps only the OGG file can be stored on the server; when the ULM client downloads the age, it could activate a converter that generates a WAV file for the OGG file. I know of one bit of open-source code that has this conversion:

http://audacity.cvs.sourceforge.net/audacity/

What do you think?

Re: Sounds and ULM

PostPosted: Sat Jan 26, 2008 10:40 pm
by Chacal
I think this solution is a little clunky. Surely there are dedicated, command-line ogg-to-wav converters out there.

BTW, do we know for sure what file is needed for each kind of sound?
There are many more .ogg files than .wav files in the Uru directories.

Re: Sounds and ULM

PostPosted: Sat Jan 26, 2008 10:43 pm
by Nadnerb
Uru generates the streamingCache files by decompressing some of the ogg files in the sfx directory. In theory, we might only need the ogg files.

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 12:37 am
by Chacal
That fits with what I thought, but this week somebody said something different, and the wiki only mentions .wav files.
Should be easy to test, if only I had some time.

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 1:09 am
by Trylon
Ive been doing some tests, and preliminary testing suggests that we don't need to distribute the .wav file along with the ogg file.

Curently, ULM already supports sending along ogg files from the sfx folder, so if the streamingcache files aren't neccesary, the sound support is already there. Please help me test it out...

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 11:04 am
by Aloys
I distinctly remember not having any sound in Ages if I had no wav files in the cache. Now this happened for the Cyan AGes (I had cleared out the cache folder because I needed some space on my HD) and I had to expand manualy the OGG files again using the SoundDecompress.exe file.
I don't see why it would be different for custom Ages, I might be wrong though as I haven't done any specific test.

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 12:30 pm
by Paradox
I have just tested streaming sound with only a .ogg file and I was able to hear it properly.

The static sounds always only need to be in .ogg format.

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 1:44 pm
by Nadnerb
Well, since our current sound emitters default to streamingSound rather than staticSound objects, this won't be an issue for the moment. However, IIRC, hoikas just added support for static sounds, so it seems that eventually we will need streamingCache support in ULM. (for simplicity of implementation, perhaps distribute ogg files, and run soundDecompress after installing?)

Re: Sounds and ULM

PostPosted: Sun Jan 27, 2008 2:03 pm
by Trylon
Nad,
both Paradox and I tested Streaming sounds, that only have the .ogg file in the SFX folder.
Quite probably the StreamingCache folder is just that - a cache folder, and there will be no need to distribute sounds to go into it.

Preliminary conclusion:
For both static and streaming sounds, we only need to distribute the .ogg sound file in the SFX folder, something that ULM already supports.