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
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.
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 ).
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.
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 en.wikipedia.org/wiki/Full_employment_theorem ).
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 ( en.wikipedia.org/wiki/Halting_problem )