refactor: add some logs to help understand what is happening during soundfont selection.

It helps understand what soundfont is currently used

refs: https://github.com/ZDoom/ZMusic/pull/44
This commit is contained in:
Emanuele Disco 2023-01-24 11:01:26 +09:00 committed by Rachael Alexanderson
parent 54d9472766
commit faaf938b18

View file

@ -45,6 +45,7 @@
#include "findfile.h" #include "findfile.h"
#include "i_interface.h" #include "i_interface.h"
#include "configfile.h" #include "configfile.h"
#include "printf.h"
//========================================================================== //==========================================================================
// //
@ -447,6 +448,7 @@ const FSoundFontInfo *FSoundFontManager::FindSoundFont(const char *name, int all
// an empty name will pick the first one in a compatible format. // an empty name will pick the first one in a compatible format.
if (allowed & sfi.type && (name == nullptr || *name == 0 || !sfi.mName.CompareNoCase(name) || !sfi.mNameExt.CompareNoCase(name))) if (allowed & sfi.type && (name == nullptr || *name == 0 || !sfi.mName.CompareNoCase(name) || !sfi.mNameExt.CompareNoCase(name)))
{ {
DPrintf(DMSG_NOTIFY, "Found compatible soundfont %s\n", sfi.mNameExt.GetChars());
return &sfi; return &sfi;
} }
} }
@ -455,6 +457,7 @@ const FSoundFontInfo *FSoundFontManager::FindSoundFont(const char *name, int all
{ {
if (allowed & sfi.type) if (allowed & sfi.type)
{ {
DPrintf(DMSG_NOTIFY, "Unable to find %s soundfont. Falling back to %s\n", name, sfi.mNameExt.GetChars());
return &sfi; return &sfi;
} }
} }