feat(presets): add creative internal effect chain templates (phase 94)
This commit is contained in:
parent
c6f384a623
commit
c65ac61a98
7 changed files with 62 additions and 4 deletions
|
|
@ -247,6 +247,9 @@ int creative_workflow_tests()
|
|||
CHECK(window.undo()==XTC_OK);panel->refresh(true);
|
||||
CHECK(xtc_project_get_chain(s->project(),first_track,&chain)==XTC_OK && chain.output_gain==.6f);
|
||||
panel->select_track(second_track);CHECK(!panel->comparison_ready(0) && panel->comparison(0,false)==XTC_ERR_NOT_FOUND);
|
||||
CHECK(panel->apply_template(1)==XTC_OK);
|
||||
CHECK(xtc_project_get_chain(s->project(),second_track,&chain)==XTC_OK && chain.count==2 && chain.slots[0].plugin.values[0]==375);
|
||||
CHECK(window.undo()==XTC_OK);panel->refresh(true);CHECK(xtc_project_get_chain(s->project(),second_track,&chain)==XTC_OK && chain.count==0);
|
||||
CHECK(window.new_project()==XTC_OK && !panel->clipboard_ready() && panel->paste_chain()==XTC_ERR_NOT_FOUND);
|
||||
CHECK(!panel->comparison_ready(0) && !panel->comparison_ready(1));
|
||||
window.do_callback();puts("Creative workflow GUI checks passed.");return failures ? 1 : 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
int main(void)
|
||||
{
|
||||
xtc_track_chain c={0},out={0};
|
||||
|
|
@ -15,5 +16,14 @@ int main(void)
|
|||
for(size_t i=3;i<XTC_TRACK_INSERTS;++i)out.slots[i]=out.slots[0];
|
||||
out.count=XTC_TRACK_INSERTS;c=out;
|
||||
assert(xtc_track_chain_duplicate(&out,0,&out)==XTC_ERR_CAPACITY && !memcmp(&c,&out,sizeof(c)));
|
||||
for(unsigned int preset=0;preset<3;++preset) {
|
||||
xtc_graph *g=NULL;xtc_plan *plan=NULL;float input[512]={1},output[512];double energy=0;
|
||||
assert(xtc_track_chain_template_name(preset) && xtc_track_chain_template(preset,135000,&c)==XTC_OK && xtc_track_chain_validate(&c)==XTC_OK);
|
||||
assert(c.slots[0].plugin.tempo==135000 && xtc_track_chain_graph(&c,&g)==XTC_OK && xtc_graph_compile(g,8000,512,&plan)==XTC_OK);
|
||||
assert(xtc_plan_process(plan,input,output,512)==XTC_OK);
|
||||
for(size_t i=0;i<512;++i){assert(isfinite(output[i]));energy+=output[i]*output[i];}assert(energy>0);
|
||||
xtc_plan_destroy(plan);xtc_graph_destroy(g);
|
||||
}
|
||||
out=c;assert(!xtc_track_chain_template_name(3) && xtc_track_chain_template(3,120000,&c)==XTC_ERR_INVALID_ARGUMENT && !memcmp(&out,&c,sizeof(c)));
|
||||
puts("Creative editing core checks passed.");return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue