From 10935e7be87267761c60ec5b572f7b37a0004e8e Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Sat, 30 Jan 2021 12:17:49 +0100 Subject: [PATCH] Permit loading SFZ which contain errors (Hindu Flute) --- src/sfizz/Synth.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index d951b39a..ef54fe98 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -492,8 +492,11 @@ bool Synth::loadSfzFile(const fs::path& file) fs::path realFile = fs::canonical(file, ec); impl.parser_.parseFile(ec ? file : realFile); - if (impl.parser_.getErrorCount() > 0) - return false; + // permissive parsing for compatibility + if (false) { + if (impl.parser_.getErrorCount() > 0) + return false; + } if (impl.regions_.empty()) return false; @@ -511,8 +514,11 @@ bool Synth::loadSfzString(const fs::path& path, absl::string_view text) impl.clear(); impl.parser_.parseString(path, text); - if (impl.parser_.getErrorCount() > 0) - return false; + // permissive parsing for compatibility + if (false) { + if (impl.parser_.getErrorCount() > 0) + return false; + } if (impl.regions_.empty()) return false;