xpenatan / gdx-teavm

Run Libgdx in a webbrowser with teavm
Apache License 2.0
107 stars 16 forks source link

Audio question on mobile browsers #107

Closed Quillraven closed 1 year ago

Quillraven commented 1 year ago

I am wondering if this is a TeaVM issue or in general a mobile browser issue. My game is working totally fine on desktop browsers but on mobile it has issues with audio. To me it feels like "concurrent" audio playback isn't working because it simply turns off the music, when a sound effect is played.

Any ideas how that can be solved?

Link to the project: https://github.com/Quillraven/MysticGarden Link to the game: https://quillraven.github.io/MysticGarden/

xpenatan commented 1 year ago

Yes, there is a issue with sound. It's in my TODO list to update it and have the same implementation as GWT. Some people in discord replaced source code with the old sound code from teavm repository. https://github.com/konsoletyper/teavm-libgdx/blob/master/core/src/main/java/org/teavm/libgdx/TeaVMSound.java https://github.com/konsoletyper/teavm-libgdx/blob/master/core/src/main/java/org/teavm/libgdx/TeaVMMusic.java

Quillraven commented 1 year ago

Ok, thanks for the update! Good to hear that this is already known and will be worked on in the future 👍