Skip to content

Commit

Permalink
refactor: add some logs to help understand what is happening during s…
Browse files Browse the repository at this point in the history
…oundfont selection.

It helps understand what soundfont is currently used

refs: ZDoom/ZMusic#44
  • Loading branch information
emawind84 authored and madame-rachelle committed Jan 24, 2023
1 parent 54d9472 commit faaf938
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/audio/music/i_soundfont.cpp
Expand Up @@ -45,6 +45,7 @@
#include "findfile.h"
#include "i_interface.h"
#include "configfile.h"
#include "printf.h"

//==========================================================================
//
Expand Down Expand Up @@ -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.
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;
}
}
Expand All @@ -455,6 +457,7 @@ const FSoundFontInfo *FSoundFontManager::FindSoundFont(const char *name, int all
{
if (allowed & sfi.type)
{
DPrintf(DMSG_NOTIFY, "Unable to find %s soundfont. Falling back to %s\n", name, sfi.mNameExt.GetChars());
return &sfi;
}
}
Expand Down

0 comments on commit faaf938

Please sign in to comment.