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

Audio playback loops more times than it should #197

Open
AShiningRay opened this issue Oct 21, 2023 · 0 comments · May be fixed by #199
Open

Audio playback loops more times than it should #197

AShiningRay opened this issue Oct 21, 2023 · 0 comments · May be fixed by #199

Comments

@AShiningRay
Copy link
Contributor

Not exactly a good issue to explain, but the general gist of it is as follows:

On both MIDI and Wav streams (including ADPCM, which made things even more apparent since that one is mostly used for SFX), playback always repeats twice for audio that should only play once, thrice for audio that should play only twice, and so on.

This seems to be caused by a mismatch in how J2ME and Java 8+ interpret loop counts. On J2ME a count of 1 denotes that a certain audio cue should only play a single time, whereas on Java 8 a count of 1 denotes that it should play, and then loop another time... at least that's what happens on all games i tested so far.

I got a simple fix for that, pushing soon alongside another issue i want to discuss.

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 a pull request may close this issue.

1 participant