1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

LV2 Client: Use preferredChannelConfiguration if available when writing manifest

This commit is contained in:
reuk 2022-08-01 13:24:04 +01:00
parent 028d1eea78
commit 7ebd34012c

View file

@ -799,20 +799,19 @@ struct RecallFeature
const auto processor = LV2PluginInstance::createProcessorInstance();
const File absolutePath { CharPointer_UTF8 { libraryPath } };
processor->enableAllBuses();
const auto writers = { writeManifestTtl, writeDspTtl, writeUiTtl };
for (auto* fn : { writeManifestTtl, writeDspTtl, writeUiTtl })
const auto wroteSuccessfully = [&processor, &absolutePath] (auto* fn)
{
const auto result = fn (*processor, absolutePath);
if (result.wasOk())
continue;
if (! result.wasOk())
std::cerr << result.getErrorMessage() << '\n';
std::cerr << result.getErrorMessage() << '\n';
return 1;
}
return result.wasOk();
};
return 0;
return std::all_of (writers.begin(), writers.end(), wroteSuccessfully) ? 0 : 1;
};
private: