Phase 31: add CLAP, VST2 and VST3 mono effect hosting
This commit is contained in:
parent
90eac33a71
commit
9e0e4562d7
114 changed files with 10369 additions and 75 deletions
|
|
@ -711,7 +711,7 @@ int main(int argc, char **argv)
|
|||
// Exercise the actual modal chooser/editor with copied metadata only.
|
||||
Fl::add_timeout(.05,[](void *) {
|
||||
auto *dialog = Fl::first_window();
|
||||
CHECK(dialog && dialog->label() && std::strcmp(dialog->label(),"LADSPA descriptors") == 0);
|
||||
CHECK(dialog && dialog->label() && std::strcmp(dialog->label(),"Plugin descriptors") == 0);
|
||||
if (!dialog) return;
|
||||
for (int i = 0; i < dialog->children(); ++i)
|
||||
if (auto *list = dynamic_cast<Fl_Hold_Browser *>(dialog->child(i))) {
|
||||
|
|
@ -803,6 +803,30 @@ int main(int argc, char **argv)
|
|||
unlink("/tmp/xtc-gui-plugin-test.xtc");
|
||||
window.do_callback();
|
||||
}
|
||||
for (const char *variable : {"XTC_TEST_CLAP","XTC_TEST_VST2","XTC_TEST_VST3"}) {
|
||||
if (const char *module = std::getenv(variable)) {
|
||||
reset(); MainWindow window(false); auto *sequence = timeline(&window);
|
||||
size_t id = SIZE_MAX; xtc_plugin_spec spec{};
|
||||
CHECK(window.add_plugin(module,0,&id) == XTC_OK);
|
||||
CHECK(xtc_graph_get_plugin(xtc_project_graph(sequence->project()),id,&spec) == XTC_OK);
|
||||
CHECK(spec.format != XTC_PLUGIN_LADSPA && spec.inputs == 1 && !spec.control_count);
|
||||
CHECK(window.undo(false) == XTC_OK && window.undo(true) == XTC_OK);
|
||||
Fl::add_timeout(.05,[](void *) {
|
||||
auto *dialog = Fl::first_window(); CHECK(dialog);
|
||||
auto *choose = find(dialog,"Choose"); CHECK(choose); if (choose) choose->do_callback();
|
||||
});
|
||||
unsigned int chosen = UINT32_MAX;
|
||||
CHECK(xtc_choose_plugin(module,48000,chosen) && chosen == 0);
|
||||
CHECK(window.save_project("/tmp/xtc-gui-modern-test.xtc") == XTC_OK);
|
||||
CHECK(window.new_project() == XTC_OK);
|
||||
CHECK(window.open_project("/tmp/xtc-gui-modern-test.xtc") == XTC_OK);
|
||||
xtc_plugin_spec loaded{};
|
||||
CHECK(xtc_graph_get_plugin(xtc_project_graph(sequence->project()),id,&loaded) == XTC_OK && loaded.format == spec.format);
|
||||
const xtc_project *before = sequence->project();
|
||||
CHECK(window.replace_plugin(id,"/absent/modern.so",0) == XTC_ERR_NOT_FOUND && sequence->project() == before);
|
||||
unlink("/tmp/xtc-gui-modern-test.xtc"); window.do_callback();
|
||||
}
|
||||
}
|
||||
if (failures != 0) return 1;
|
||||
std::printf("GUI controls/errors/views/timers/cleanup passed: %u opens, %u closes.\n", opens, closes);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue