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

PlatformPlayer: Attempt to load audio files with empty contentType #203

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

AShiningRay
Copy link
Contributor

Fixes #202

Refer to that issue for more in-depth info. This one is rather rare, but there are apps which do indeed pass an audio stream to FreeJ2ME without providing its type, so we have to manually try and load them as one of the supported formats.

In "Gangstar Rio - City of Saints", it appears this empty type
is actually used by WAV files, so let's try opening streams that
come with those empty strings, they might contain one of the
supported media formats.

As opposed to printing "No player for: " on the console, Gangstar
Rio now plays SFX correctly. Jurassic Park on the other hand,
fails to open its very first audio stream as either MIDI or WAV.
Since we will manually try to load streams without an explicit type
as one of the supported formats, opening a midi stream is now far
more likely to fail, so account for that and close the Sequencer
whenever that is the case.
@recompileorg recompileorg merged commit 896146a into hex007:master Feb 16, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Certain J2ME apps try to load audio streams without giving an explicit content type
2 participants