Skip to content

Commit

Permalink
Disable a soundfont warning in non-Debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Jan 24, 2025
1 parent ee84a67 commit c1cfe00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions audio/midi/fluid/sfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c1cfe00

Please sign in to comment.