Using OGG for ANY type of sound

I’d like to be able to use OGG for any type of sound, both effects and music. WAVs are just too big.

You may say that size of WAVs for things like sounds doesn’t matter, but consider this: You have top down shooter with many weapons with different shooting sound for each of them. Also for any enemy type, there are separate sounds for attacks and dying, chosen at random so they won’t always die same way. Soon your project is way over 80mb in just sfx assets. Not counting music and graphics.

With using OGG for these sounds, it’d be like 1/3 of this, maybe even less (depends on the level of compression). Quality won’t also be affected that much.


You can play ogg in Sound and Music event.You can select only .wav but if you enter the name of your ogg file manually,like “sound.ogg” it going to play it :slight_smile:

Didn’t know that, cool!

@4ian, if it does play it anyway, why limit selection? Based on my knowledge of wxWidgets, it’d be just one or two lines to change.

There is a strong difference on the native platform between sound and music ( music are streamed in memory, and only ogg is usable, while wav files are loaded entirely and then played ), so I cannot merge these two types of sounds.

Everything can be done.

Simplest solution would be just to stream everything (would cut ram usage in my example of bajillion weapon sound effects).

If that is not feasible for some reason, then how about this:

If file is played as sound, load it into memory
If file is played as music, stream it.

Anyway, this is moot point as I only want to be able to use OGG for SOUNDS, not MUSIC. No one with mind intact would use WAVs for music anyway.

Also, this two line fix, I’ve talked about… was adding OGG (*.ogg) type to file selector when choosing sound (since typing directly name with .ogg works. Cheers.

I’ll add the ogg to the file selector as it seems to work with sound ( Didn’t notice that before ). :slight_smile:
But I’ll keep the two concepts of sound and music: It is important in particular on the native platform so that performance are optimal ( Lightweight sounds for the effects/more heavy streamed musics ).

Without wanting to sound pessimistic, there are mathematical theorems that state that no, sometimes you can not do something. :slight_smile:
For example, you can not create a mathematical theory containing no unprovable sentences ( i.e : sentences that you cannot prove to be right or wrong ). Sounds a bit weird, but similarly, when talking about computer science, you cannot create a perfect optimizing compiler ( see ).
And you can not create a program that will read the source code of another second program and tell us if this second program will stop or if it will run forever ( )