RFC: How to handle Ineluki's MP3 patch #939

Closed
carstene1ns opened this Issue Jul 18, 2016 · 5 comments

Projects

None yet

3 participants

@carstene1ns
Member
carstene1ns commented Jul 18, 2016 edited

Back in the days when RPG Maker 2000 did not support mp3 music natively, there was a patch by Ineluki that used a modified harmony.dll to accomplish that.
It used *.link.wav files in the Music folder that contained a relative path in them (mostly to a separate mp3 folder in the game directory) and sometimes also commands like loop in a second line.
While these games could have been updated in the meantime to more recent RPG_RT versions that do not need the patch, there are a lot unmaintained ones.

While we could certainly do a string comparison to check for them (like #731) and display a warning, this will lead to a problem: Even if the mp3 file is copied over to the music folder retaining the wav filename, the .link still is a part of the filename to match the database entry. So we will show the warning again, even if it is bogus. And we cannot wait until the files get rejected by the audio backend, because Player will show an unrelated SDL_mixer warning then.

A thing that came to mind is just stripping off the .link part of the filename, if there is one in the database and so trying to play the right file (residing in the same folder copied over by the user without the extension). This way it will not block the old RPG_RT/harmony.dll way.

Edit: btw. Calm Falls (#940) uses this patch.

@Ghabry
Member
Ghabry commented Jul 18, 2016 edited

I think the easiest solution is to really parse the files when it ends on ".link" but this needs some adjustments to the read filename to make it FileFinder-friendly.

I would suggest to only read the first line and to ignore the rest.

..\mp3\01-Theme_Of_Laura.mp3

..\ -> Strip this part, we are in Music

FileFinder::FindDefault("mp3\01-Theme_Of_Laura.mp3")

Maybe the filefinder should do the path normalising???

and ..\..\ should throw a warning because of out of project-dir read

@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Jul 28, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
46bb84e
@Ghabry
Member
Ghabry commented Jul 28, 2016 edited

I would like to propose a patch for this:
Ghabry@e305582

Ghabry@46bb84e

already see some bugs:
Missing return in the !stream-case
bgm_pending = false; not set for ineluki case
messed up the whitespacing

There are also other commits in this branch because it is based on my Audio branch because I needed a way to pass paths directly to the audiointerface instead of depending on them calling FindMusic.

@Ghabry
Member
Ghabry commented Jul 29, 2016

Are there other commands available besides loop? I can't find the documentation.

@carstene1ns
Member

It seems loop is the only command, at least it is the only available option in the provided link maker program.
screenshot

@Ghabry
Member
Ghabry commented Jul 29, 2016

Okay then I will just ignore the 2nd line. Doesn't make a big difference if you loop a long bgm or not.

@carstene1ns carstene1ns added this to the 0.5.0 milestone Jul 30, 2016
@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Aug 2, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
3469b16
@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Aug 2, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
49fc01a
@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Aug 2, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
5d07e36
@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Aug 2, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
f03bc26
@carstene1ns carstene1ns pushed a commit that closed this issue Aug 4, 2016
@Ghabry Ghabry Make the Ineluki MP3 Path canonical and change logic of the default f…
…ile finder search to detect directories. Fixes #939
fb28cd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment