Thus, on mobile browsers you might get a compressed sound that you can't use with Audio2.play() because there is no way to uncompress them (apart from manually doing this, of course).
To Reproduce
Load an .ogg Vorbis sound on the html5 target in a mobile browser (or in a desktop web browser with mobile emulation).
Execution Environment:
Host system (where you compile your code): Windows 10
Additional context
It would probably work to copy uncompress() from WebAudioSound, although (slightly off-topic) this definitely needs some work as well, as distributing the work over many frames even if the frame's workload is small is needlessly slow (sometimes > 10 seconds for music, for example).
Describe the bug
MobileWebAudioSound.uncompress
immediately callsdone
without any actual decompression, but theLoaderImpl
might createMobileWebAudioSound
objects with compressed audio files such as Ogg Vorbis: https://github.com/Kode/Kha/blob/9cd3174ee62510efc9bd807b698b1993938fabd7/Backends/HTML5/kha/js/MobileWebAudioSound.hx#L34-L36 https://github.com/Kode/Kha/blob/9cd3174ee62510efc9bd807b698b1993938fabd7/Backends/HTML5/kha/LoaderImpl.hx#L134-L135Thus, on mobile browsers you might get a compressed sound that you can't use with
Audio2.play()
because there is no way to uncompress them (apart from manually doing this, of course).To Reproduce Load an .ogg Vorbis sound on the html5 target in a mobile browser (or in a desktop web browser with mobile emulation).
Execution Environment:
Additional context It would probably work to copy
uncompress()
fromWebAudioSound
, although (slightly off-topic) this definitely needs some work as well, as distributing the work over many frames even if the frame's workload is small is needlessly slow (sometimes > 10 seconds for music, for example).