Phase 26: add common parameter targets, step automation and MIDI control mapping
This commit is contained in:
parent
7bff7b535d
commit
901a536f10
38 changed files with 740 additions and 67 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "../../src/gui/mixer_widget.hpp"
|
||||
#include "../../src/gui/plugin_dialog.hpp"
|
||||
#include <FL/Fl_Hold_Browser.H>
|
||||
#include <FL/Fl_Choice.H>
|
||||
#include <unistd.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
|
|
@ -630,6 +631,31 @@ int main(int argc, char **argv)
|
|||
mixer->reset_meters(); CHECK(!mixer->master_clipped());
|
||||
window.do_callback();
|
||||
}
|
||||
{
|
||||
reset(); MainWindow window(false);
|
||||
auto *sequence = timeline(&window);
|
||||
unsigned int bindings[3] = {1,74,11}, actual[3];
|
||||
CHECK(window.set_control_map(2,bindings) == XTC_OK);
|
||||
CHECK(xtc_project_get_control_map(sequence->project(),2,actual) == XTC_OK && actual[0] == 1);
|
||||
CHECK(window.undo(false) == XTC_OK);
|
||||
CHECK(xtc_project_get_control_map(sequence->project(),2,actual) == XTC_OK && actual[0] == 7);
|
||||
CHECK(window.undo(true) == XTC_OK);
|
||||
const xtc_project *before = sequence->project();
|
||||
bindings[1] = 1;
|
||||
CHECK(window.set_control_map(2,bindings) == XTC_ERR_INVALID_ARGUMENT && sequence->project() == before);
|
||||
auto *mixer_ui = window.mixer();
|
||||
CHECK(sequence->add_track() == XTC_OK);
|
||||
auto *mode = dynamic_cast<Fl_Choice *>(find(&window,"Interpolation")); CHECK(mode);
|
||||
if (mode) mode->value(1);
|
||||
CHECK(mixer_ui->point(0,.25f) == XTC_OK);
|
||||
xtc_automation_point point{};
|
||||
CHECK(xtc_project_get_automation(sequence->project(),0,&point) == XTC_OK && point.step == 1);
|
||||
CHECK(window.save_project("/tmp/xtc-gui-controls-test.xtc") == XTC_OK);
|
||||
CHECK(window.new_project() == XTC_OK && window.open_project("/tmp/xtc-gui-controls-test.xtc") == XTC_OK);
|
||||
CHECK(xtc_project_get_control_map(sequence->project(),2,actual) == XTC_OK && actual[0] == 1 && actual[1] == 74);
|
||||
CHECK(xtc_project_get_automation(sequence->project(),0,&point) == XTC_OK && point.step == 1);
|
||||
unlink("/tmp/xtc-gui-controls-test.xtc"); window.do_callback();
|
||||
}
|
||||
if (const char *module = std::getenv("XTC_TEST_PLUGIN")) {
|
||||
reset();
|
||||
MainWindow window(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue