korge icon indicating copy to clipboard operation
korge copied to clipboard

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

Open Drestin opened this issue 1 year ago • 2 comments

I open this issue following my post on Discord.

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

  • OGG music don't work
  • OGG sound works only on web
  • For WAV and MP3:
    • Sounds only work on JVM
    • Musics only work on web

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 :)

Drestin avatar Feb 14 '24 18:02 Drestin

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

soywiz avatar Feb 15 '24 12:02 soywiz

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 avatar Feb 23 '24 13:02 soywiz