feat: export sample ranges and adopt new source copies with rollback and project undo
This commit is contained in:
parent
3d031a0010
commit
342a93385c
10 changed files with 62 additions and 4 deletions
|
|
@ -25,5 +25,10 @@ int main(void)
|
|||
assert(xtc_project_trim_source_frames(p,c,48000,1001,1002)==XTC_ERR_INVALID_ARGUMENT);
|
||||
assert(xtc_project_find_clip(p,c,&clip)==XTC_OK && clip.offset_tick==40 && clip.length_tick==40);
|
||||
xtc_project_destroy(p);}
|
||||
{char copy[256];xtc_sample *q=NULL;snprintf(copy,sizeof(copy),"%s/copy.wav",root);
|
||||
assert(xtc_sample_write(s,1,7,copy)==XTC_OK && xtc_sample_write(s,1,7,copy)==XTC_ERR_IO);
|
||||
assert(xtc_sample_load(copy,&q)==XTC_OK && xtc_sample_info(q,&rate,&frames)==XTC_OK && frames==6 && rate==8000);
|
||||
for(size_t j=0;j<6;++j){assert(xtc_sample_read(q,j,&v)==XTC_OK && v==values[j+1]);}
|
||||
xtc_sample_destroy(q);assert(unlink(copy)==0);assert(xtc_sample_write(s,0,8,"relative.wav")==XTC_ERR_INVALID_ARGUMENT);}
|
||||
xtc_sample_destroy(s);assert(unlink(path)==0 && rmdir(root)==0);puts("Sample editor core tests passed.");return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue