45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 083b99557f0b0808088a53f5ea5efca040eb25e9 Mon Sep 17 00:00:00 2001
|
|
From: Emanuele Disco <emawind84@gmail.com>
|
|
Date: Tue, 24 Jan 2023 11:01:26 +0900
|
|
Subject: [PATCH 28/51] 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
|
|
---
|
|
src/common/audio/music/i_soundfont.cpp | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/common/audio/music/i_soundfont.cpp b/src/common/audio/music/i_soundfont.cpp
|
|
index f05f0cb76..af1c5634c 100644
|
|
--- a/src/common/audio/music/i_soundfont.cpp
|
|
+++ b/src/common/audio/music/i_soundfont.cpp
|
|
@@ -45,6 +45,7 @@
|
|
#include "findfile.h"
|
|
#include "i_interface.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.
|
|
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;
|
|
}
|
|
}
|
|
@@ -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;
|
|
}
|
|
}
|
|
--
|
|
2.39.3
|
|
|