[SOLVED]OGG memory usage

Which way JME stores .ogg files in memory - is it uncompressed, like .jpg converted into array of pixels? Or is it stored as is and uncompressed on the fly during playback in audio library?

1 Like

Tested it on my own.

Ogg file needs the same memory amount as wav file → JME stores ogg in uncompressed format.

1 Like

I think it depends on if you’ve set streaming=true or not.

There is an option to let them stream rather than load the whole thing (else my ambient music oggs would totally overwhelm). JME used to do that all the time but then you couldn’t rewind or loop them.

So if it’s an ogg sound that’s streaming then it shouldn’t load the whole thing.

It’s funny though because we now seem to have no equivalent of the deprecated method that let you cache streaming audio:

A lot of times, I think changes to audio are only done half way… so some use-case gets left out.

1 Like

Forgot to mention that in this case I (think that I) don’t need streamed sounds. Those are sfx, so I need to load 20-50-100-dontknowhowmuch small and short files and I need to have instant access. Do you think that it is a good idea to use streaming sound for sfx?

1 Like

No. You’d have to reload them every time you wanted to play them again. (At least unless JME made the streams restartable… use to not.)

I guess maybe JME doesn’t support caching the audio in compressed form… which is a bit of a shame.

I think our current state is a patch on top of a patch on top of a patch that has the burden of some early ingrained limitations in abstractions.

1 Like