Game Music Emu Update?

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Game Music Emu Update?

Postby Kinsie » Tue Jun 27, 2017 2:31 pm

Game Music Emu, for those not aware, is the library ZDoom uses to handle emulated music formats like SPC and VGM.

The VGM format was originally developed to handle music from a couple of very specific platforms - the Master System and Genesis - but in more recent years has been expanded to support a great number of audio chips, allowing for the format to support platforms as varied as the Neo Geo and Sharp X68000 that have no equivalents elsewhere in ZDoom, as well as a few that are supported in other ways like the NES and PC Adlib.

Updating ZDoom's Game Music Emu implementation was suggested a couple of years ago. but was turned down due to licensing conflicts involving the library getting relicensed by a new maintainer under the GPL, and as a result the library has sat more or less static since with the exception of a backported security fix. Since the GPL conflict is no longer an issue, I'd appreciate if this was reconsidered - much like with the current, mature game music implementations like SPC, it would allow maps and mods that used music from other videogames to achieve an authentic sound at a much lower filesize hit than creating an OGG version.
User avatar
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Game Music Emu Update?

Postby Graf Zahl » Tue Jun 27, 2017 3:30 pm

If someone can set it up, sure. I don't have time for this right now.
There's a lot of new stuff - this is not just a simple drop-in replacement - and some work is needed to make it fit together.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Game Music Emu Update?

Postby Shadow Hog » Thu Jul 06, 2017 1:51 am

Also in favor of this feature, though since it was my post linked in the OP, I suppose that was a given.

On a whim, I decided to take a stab at implementing it myself, but my inexperience quickly got the better of me. Attempting to point the project to an external folder containing kode54's GME implementation, as well as a .lib file from a compile thereof that I'd done earlier, just resulted in various linker errors in music_gme.obj that imply to me that that .lib file either wasn't built correctly, or wasn't the correct thing to plug into GME_LIBRARIES in CMake:

Code: Select allExpand view
unresolved external symbol gme_start_track referenced in function "public: virtual void __cdecl GMESong::Play(bool,int)" (?Play@GMESong@@UEAAX_NH@Z)
unresolved external symbol gme_play referenced in function "protected: static bool __cdecl GMESong::Read(class SoundStream *,void *,int,void *)" (?Read@GMESong@@KA_NPEAVSoundStream@@PEAXH1@Z)
unresolved external symbol gme_delete referenced in function "public: virtual __cdecl GMESong::~GMESong(void)" (??1GMESong@@UEAA@XZ)
unresolved external symbol gme_set_fade referenced in function "public: virtual void __cdecl GMESong::Play(bool,int)" (?Play@GMESong@@UEAAX_NH@Z)
unresolved external symbol gme_track_ended referenced in function "protected: static bool __cdecl GMESong::Read(class SoundStream *,void *,int,void *)" (?Read@GMESong@@KA_NPEAVSoundStream@@PEAXH1@Z)
unresolved external symbol gme_tell referenced in function "public: virtual class FString __cdecl GMESong::GetStats(void)" (?GetStats@GMESong@@UEAA?AVFString@@XZ)
unresolved external symbol gme_track_info referenced in function "protected: bool __cdecl GMESong::GetTrackInfo(void)" (?GetTrackInfo@GMESong@@IEAA_NXZ)
unresolved external symbol gme_free_info referenced in function "public: virtual __cdecl GMESong::~GMESong(void)" (??1GMESong@@UEAA@XZ)
unresolved external symbol gme_set_stereo_depth referenced in function "protected: virtual void __cdecl GMESong::GMEDepthChanged(float)" (?GMEDepthChanged@GMESong@@MEAAXM@Z)
unresolved external symbol gme_identify_header referenced in function "char const * __cdecl GME_CheckFormat(unsigned int)" (?GME_CheckFormat@@YAPEBDI@Z)
unresolved external symbol gme_identify_extension referenced in function "class MusInfo * __cdecl GME_OpenSong(class FileReader &,char const *)" (?GME_OpenSong@@YAPEAVMusInfo@@AEAVFileReader@@PEBD@Z)
unresolved external symbol gme_new_emu referenced in function "class MusInfo * __cdecl GME_OpenSong(class FileReader &,char const *)" (?GME_OpenSong@@YAPEAVMusInfo@@AEAVFileReader@@PEBD@Z)
unresolved external symbol gme_load_data referenced in function "class MusInfo * __cdecl GME_OpenSong(class FileReader &,char const *)" (?GME_OpenSong@@YAPEAVMusInfo@@AEAVFileReader@@PEBD@Z)

Before such linker errors, though, the only change that seemed to be necessary was adding a third "fade length (in milliseconds)" parameter to music_gme.cpp:273 (I just went with 0 for what's presumably an instant stop, but I don't know what the proper value actually would be).

Replacing the files inside the game_music_emu folder would obviously be the better angle, though kode54's Github didn't actually include any CMakeLists.txt to work off of (and I don't really know the first thing about writing one). Also probably would mean importing his File_Extractor project that he rewrote the GME code to use in lieu of Data_Reader.h (for reasons not wholly adequately explained), or else rewriting the code to excise it... tasks probably better left to people who better know what they're doing than myself.
Shadow Hog
 
Joined: 14 Aug 2015

Re: Game Music Emu Update?

Postby Rachael » Thu Dec 27, 2018 6:39 am

Apparently, this has already been done, so I am going to mark it accordingly.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Game Music Emu Update?

Postby Kinsie » Thu Dec 27, 2018 8:12 am

Rachael wrote:Apparently, this has already been done, so I am going to mark it accordingly.
Looks like it was an update to the latest version of the code that GZDoom uses. So, mainly bug and security fixes and improvements to existing functionality, as I understand it. Which is great and very much appreciated! But this feature request was about adding extra functionality from a fork, which as I understand it is a hairier proposition.
User avatar
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Game Music Emu Update?

Postby Rachael » Thu Dec 27, 2018 8:13 am

My mistake - I will reopen this.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle


Return to Feature Suggestions

Who is online

Users browsing this forum: Awario [RSS] and 1 guest