feat: ripple timeline ranges with markers and automation atomically
This commit is contained in:
parent
bd39eb1345
commit
7084e660fe
9 changed files with 95 additions and 5 deletions
|
|
@ -46,4 +46,22 @@ static void sections(void)
|
|||
assert(xtc_project_set_marker(p,9000,"Empty")==XTC_OK && xtc_project_section(p,9000,&begin,&end)==XTC_ERR_INVALID_STATE);
|
||||
xtc_project_destroy(p);
|
||||
}
|
||||
int main(void){markers();sections();puts("Next DAW workflow tests passed.");return 0;}
|
||||
static void ripple(void)
|
||||
{
|
||||
xtc_project *p=NULL;uint64_t t,c,a;xtc_clip_info clip;xtc_marker m;xtc_automation_point point;
|
||||
assert(xtc_project_create(&p)==XTC_OK && xtc_project_add_track(p,"Track",&t)==XTC_OK);
|
||||
assert(xtc_project_add_clip(p,t,"A",0,960,&a)==XTC_OK && xtc_project_add_clip(p,t,"B",1920,960,&c)==XTC_OK);
|
||||
point=(xtc_automation_point){t,1920,XTC_AUTOMATION_GAIN,.5f,0};assert(xtc_project_set_automation(p,&point)==XTC_OK);
|
||||
assert(xtc_project_set_marker(p,1920,"B")==XTC_OK);
|
||||
assert(xtc_project_ripple_time(p,480,960,0)==XTC_ERR_INVALID_STATE);
|
||||
assert(xtc_project_ripple_time(p,960,960,0)==XTC_OK);
|
||||
assert(xtc_project_find_clip(p,c,&clip)==XTC_OK && clip.start_tick==2880);
|
||||
assert(xtc_project_get_marker(p,0,&m)==XTC_OK && m.tick==2880);
|
||||
assert(xtc_project_get_automation(p,0,&point)==XTC_OK && point.tick==2880);
|
||||
assert(xtc_project_ripple_time(p,960,1920,1)==XTC_OK);
|
||||
assert(xtc_project_find_clip(p,c,&clip)==XTC_OK && clip.start_tick==960);
|
||||
assert(xtc_project_ripple_time(p,0,960,1)==XTC_OK && xtc_project_find_clip(p,a,&clip)==XTC_ERR_NOT_FOUND);
|
||||
assert(xtc_project_find_clip(p,c,&clip)==XTC_OK && clip.start_tick==0);
|
||||
xtc_project_destroy(p);
|
||||
}
|
||||
int main(void){markers();sections();ripple();puts("Next DAW workflow tests passed.");return 0;}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue