feat: repeat arrangement phrases with bounded atomic pattern copies
This commit is contained in:
parent
b60501f317
commit
ea9789b188
10 changed files with 70 additions and 4 deletions
|
|
@ -190,6 +190,7 @@ void xtc_backend_collect(xtc_backend *backend)
|
|||
}
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if(!std::getenv("XTC_TEST_MODERN_EDITING_ONLY")) {
|
||||
reset();
|
||||
{
|
||||
MainWindow window(false,"");
|
||||
|
|
@ -1307,6 +1308,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
unlink(path.c_str());
|
||||
}
|
||||
}
|
||||
reset();
|
||||
{
|
||||
MainWindow window(false,"");window.show();CHECK(window.create_track(true)==XTC_OK);
|
||||
|
|
@ -1323,6 +1325,7 @@ int main(int argc, char **argv)
|
|||
s->select_all_clips();CHECK(s->copy_selection()==XTC_OK);s->position(7680);
|
||||
CHECK(s->paste_selection()==XTC_OK && s->selected_clips().size()==2);
|
||||
xtc_project_get_counts(s->project(),&tc,&cc);CHECK(cc==4);
|
||||
CHECK(s->repeat_selection(2)==XTC_OK);xtc_project_get_counts(s->project(),&tc,&cc);CHECK(cc==8);
|
||||
window.do_callback();
|
||||
}
|
||||
if (failures != 0) return 1;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,23 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void test_repeat(void)
|
||||
{
|
||||
xtc_project *p=NULL;uint64_t t,ids[2];xtc_clip_info c;size_t tracks,clips;
|
||||
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,240,&ids[0])==XTC_OK);
|
||||
assert(xtc_project_add_clip(p,t,"B",960,240,&ids[1])==XTC_OK);
|
||||
assert(xtc_project_repeat_clips(p,ids,2,3)==XTC_OK);
|
||||
assert(xtc_project_get_counts(p,&tracks,&clips)==XTC_OK && clips==8);
|
||||
assert(xtc_project_get_clip(p,7,&c)==XTC_OK && c.start_tick==4560);
|
||||
assert(xtc_project_repeat_clips(p,ids,2,1024)==XTC_ERR_CAPACITY);
|
||||
assert(xtc_project_get_counts(p,&tracks,&clips)==XTC_OK && clips==8);
|
||||
assert(xtc_project_repeat_clips(p,ids,2,0)==XTC_ERR_INVALID_ARGUMENT);
|
||||
xtc_project_destroy(p);
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
test_repeat();
|
||||
xtc_project *p=NULL;uint64_t track,a,b,n,ids[2],out[2]={999,999};xtc_clip_info c;
|
||||
size_t tracks,clips,notes;
|
||||
assert(xtc_project_create(&p)==XTC_OK);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue