Fix: MP3 detection would always return false for very small files#3364
Merged
Ghabry merged 1 commit intoEasyRPG:masterfrom Mar 11, 2025
Merged
Fix: MP3 detection would always return false for very small files#3364Ghabry merged 1 commit intoEasyRPG:masterfrom
Ghabry merged 1 commit intoEasyRPG:masterfrom
Conversation
…incorrectly interpret the result of the read as an error.
Ghabry
approved these changes
Mar 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have some old Advocate RTP version installed locally, which shipped with a small lame.exe utility & mp3-encoded sounds to save space.
Never bothered to run it & convert them back to wav. Now I'd get a "Format not supported" for some standard RTP sounds like "cursor1" when they should actually play normally.
Looking into the audio code I first suspected an encoding issue with the LAME version used to encode the files (3.93), but it looks like, the detection loop incorrectly handles the result of the read operation, which correctly delivers the internal "MPG123_DONE" code when its done reading.
This issue only applies to some very small files, like the menuing sounds.
cursor_se.zip