korlibs / korge

KorGE Game Engine. Multiplatform Kotlin Game Engine
https://korge.org/
Other
2.48k stars 122 forks source link

Some sound formats don't work on JVM or web JS #2149

Closed Drestin closed 1 month ago

Drestin commented 6 months ago

I open this issue following my post on Discord.

I have some issues with audios. On my computer (Linux Manjaro) and browser (Firefox):

I've set up a reproduction repo consisting of one short sound (a poke) in each of the 3 formats (mp3, wav, ogg): https://github.com/Drestin/test_korge_sounds

In the repo, I read and play the sound at each click to make sure a sound crashing won't affect the others. In my real project, I preload them and I have the same result.

I'm curious to know if this is my setup the problem, the files or something I didn't understand. Thanks for your time and goodday :)

soywiz commented 6 months ago

Thanks for the report! Really useful, I will investigate likely next week when I will start to have more time.

soywiz commented 6 months ago

OGG is only supported on Web, not in the JVM (directly) so that part is normal. It should be possible to use Opus instead in all targets: https://store.korge.org/module/korau-opus/

Going to create separate issues. One for the web and the other for the JVM.

soywiz commented 1 month ago

Only WAV, MP3, XM, S3M and MOD are supported out of the box in korge 6.0.0-beta1. OGG is not supported, only for format. OPUS and FLAG can be added via store: https://store.korge.org/module/korau-opus/ OGG Vorbis is not supported.