Skip to content

Fix: MP3 detection would always return false for very small files#3364

Merged
Ghabry merged 1 commit intoEasyRPG:masterfrom
florianessl:fixes/mp3_SE_detection
Mar 11, 2025
Merged

Fix: MP3 detection would always return false for very small files#3364
Ghabry merged 1 commit intoEasyRPG:masterfrom
florianessl:fixes/mp3_SE_detection

Conversation

@florianessl
Copy link
Copy Markdown
Member

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

…incorrectly interpret the result of the read as an error.
@Ghabry Ghabry added this to the 0.8.1 milestone Mar 5, 2025
@Ghabry Ghabry added the Audio label Mar 5, 2025
@Ghabry Ghabry merged commit 8eab21e into EasyRPG:master Mar 11, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants