From c1cfe00d0979087455a9d674979b2e877eb3aa87 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Fri, 24 Jan 2025 11:25:53 +0100 Subject: [PATCH] Disable a soundfont warning in non-Debug builds --- audio/midi/fluid/sfont.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/midi/fluid/sfont.cpp b/audio/midi/fluid/sfont.cpp index 2ec8268248b1b..57448a53070ed 100644 --- a/audio/midi/fluid/sfont.cpp +++ b/audio/midi/fluid/sfont.cpp @@ -693,9 +693,11 @@ void Sample::load() // // now add some extra sanity checks from the SF2 spec (biased so they work with unsigned int); // just a warning, they probably work with Fluid, possibly with audible artefacts though... +#ifndef NDEBUG if (!(start + 7 < loopstart) || !(loopstart + 31 < loopend) || !(loopend + 7 < end)) qWarning("SoundFont(%s) Sample(%s) start(%u) startloop(%u) endloop(%u) end(%u) smaller than SoundFont 2.04 spec chapter 7.10 recommendation", qPrintable(sf->get_name()), name, start, loopstart, loopend, end); +#endif // this used to cause a crash if (!data) {