Skip to content

Commit f8847c3

Browse files
committed
Only process MT-32 debug messages in debug builds
1 parent b653dc6 commit f8847c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/midi/midi_mt32.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,13 @@ static mt32emu_report_handler_i get_report_handler_interface()
529529
static void printDebug([[maybe_unused]] void* instance_data,
530530
const char* fmt, va_list list)
531531
{
532-
char msg[1024];
533-
safe_sprintf(msg, fmt, list);
534-
LOG_DEBUG("MT32: %s", msg);
532+
#if !defined(NDEBUG)
533+
// Skip processing MT-32 debug output in release builds
534+
// because it can be bursty
535+
char msg[1024] = "MT32: ";
536+
safe_strcat(msg, fmt);
537+
LOG_DEBUG(msg, list);
538+
#endif
535539
}
536540

537541
static void onErrorControlROM(void*)

0 commit comments

Comments
 (0)