Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncompress() not implemented for MobileWebAudioSound, but compressed sounds possible on mobile html5 #1489

Open
MoritzBrueckner opened this issue Feb 15, 2024 · 0 comments

Comments

@MoritzBrueckner
Copy link
Contributor

Describe the bug
MobileWebAudioSound.uncompress immediately calls done without any actual decompression, but the LoaderImpl might create MobileWebAudioSound objects with compressed audio files such as Ogg Vorbis:

override public function uncompress(done: Void->Void): Void {
done();
}

if (file.endsWith(".ogg")) {
new MobileWebAudioSound(file, done, failed);

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
  • Target system (where you run your code):
    • Windows 10 Firefox (mobile emulation)
    • DuckDuckGo on Android
    • Kiwi Browser on Android (this one has devtools)
  • IDE used (if any): VSCode
  • Kha revision: 9cd3174

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant