Merge pull request #600 from jpcima/compat
Permit loading SFZ which contain errors (Hindu Flute)
This commit is contained in:
commit
01daa94227
1 changed files with 10 additions and 4 deletions
|
|
@ -492,8 +492,11 @@ bool Synth::loadSfzFile(const fs::path& file)
|
||||||
fs::path realFile = fs::canonical(file, ec);
|
fs::path realFile = fs::canonical(file, ec);
|
||||||
|
|
||||||
impl.parser_.parseFile(ec ? file : realFile);
|
impl.parser_.parseFile(ec ? file : realFile);
|
||||||
if (impl.parser_.getErrorCount() > 0)
|
// permissive parsing for compatibility
|
||||||
return false;
|
if (false) {
|
||||||
|
if (impl.parser_.getErrorCount() > 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (impl.regions_.empty())
|
if (impl.regions_.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -511,8 +514,11 @@ bool Synth::loadSfzString(const fs::path& path, absl::string_view text)
|
||||||
impl.clear();
|
impl.clear();
|
||||||
|
|
||||||
impl.parser_.parseString(path, text);
|
impl.parser_.parseString(path, text);
|
||||||
if (impl.parser_.getErrorCount() > 0)
|
// permissive parsing for compatibility
|
||||||
return false;
|
if (false) {
|
||||||
|
if (impl.parser_.getErrorCount() > 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (impl.regions_.empty())
|
if (impl.regions_.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue