by Shadow Hog » Thu Jul 06, 2017 12: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 all
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.
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]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)[/code]
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.