Player icon indicating copy to clipboard operation
Player copied to clipboard

*.link.wav is not just reserved for Ineluki's MP3 Patch

Open florianessl opened this issue 3 years ago • 5 comments

Name of the game:

Les aventures d'un avatar 6

Player platform:

Windows

Attach files (as a .zip archive or link them)

Describe the issue in detail and how to reproduce it:

The french community used a tool called "Piez-o-matic" back in the day, to easily convert *.mp3 files to *.wav on the user side. This allowed them create smaller game downloads without having to resort to a MP3 patch.

I just found a game that was delivered with music files ending with ".link.mp3" which are then converted to ".link.wav". The EasyRPG Player does have a problem with these files and just states: "BGM file not readable:" screenshot_0 This game doesn't make use of Ineluki's MP3 patch but still uses the extension. I checked a few other games that were bundled with Piez-o-matic and this one seems to be the only one where that is the case. (But there could be more out there)

florianessl avatar Aug 03 '21 10:08 florianessl

I think this is a case of laziness on the authors side. (speculation ahead) While developing they used the mp3 patch by Ineluki, so the files had the .link extension in the database. When releasing they did not like it anymore (likely because the mp3 patch was buggy) and did not want/have the time to replace the music in every map. So they did the easiest, by simply removing the .link.wav files and keeping the .mp3 files for conversion by that tool. Long story short: This game is a special case.

However, we really should check for audio data before parsing the .link files. This would allow the game to run, unfortunately this is not currently possible with the audio_decoder system we have without refactor. Since these patches (Ineluki MP3/Disharmony has also support for this) have only been used for mp3 we could simply check for this (just inject Mpg123Decoder::IsMp3() call in game_system: https://github.com/EasyRPG/Player/blob/8d0976437a5adddc15a04d2f9c641905f4d8720e/src/game_system.cpp#L515-L539

carstene1ns avatar Aug 04 '21 20:08 carstene1ns

Maybe use a very basic heuristic here: When the file is < 1 Kbyte assume it is a link (this is alot for a text file, these links are usually <100 byte) . When larger it is music.

Ghabry avatar Sep 12 '21 20:09 Ghabry

This should be fine, let's do not use an expensive check here, for an unlikely problem. :+1:

carstene1ns avatar Sep 13 '21 20:09 carstene1ns

I was wondering, should this be another "feature" which could be officially supported in future versions of EasyRPG? Easy implementation: When a .wav file is not found the Player would just need to look if an appropiate .mp3 file exists.

Converting the files manually will not work on Non-Windows platforms, it demands a lot of disk space and I even had a version of Piez-o-matic crash on me on Windows 10. There's plenty of french games using this approach, so it would bump compatibility a bit.

florianessl avatar Oct 24 '21 20:10 florianessl

It will be supported in a later release of EasyRPG Player - Not in 0.7.0

(I mean... this feature is not hard really hard to add, worst part is the Emscripten async roundtrip stuff again...)

Ghabry avatar Oct 24 '21 20:10 Ghabry