feat: trim audio clips from sample editor ranges with conservative tick alignment

This commit is contained in:
Johannes Findeisen 2026-11-06 01:02:08 +01:00
commit 3d031a0010
10 changed files with 59 additions and 6 deletions

View file

@ -15,6 +15,11 @@ void xtc_sample_destroy(xtc_sample *sample);
xtc_result xtc_sample_info(const xtc_sample *sample,unsigned int *rate,size_t *frames);
xtc_result xtc_sample_read(const xtc_sample *sample,size_t frame,float *out);
xtc_result xtc_sample_analyze(const xtc_sample *sample,size_t begin,size_t end,xtc_sample_stats *out);
/* Select native source frame bounds inside the clip's current audible trim.
* Start rounds up to a tick; end rounds down. Sub-tick empty ranges reject.
* Timeline placement follows the removed leading source, preserving alignment.
* No media I/O, source content or fade changes; caller supplies source rate. */
xtc_result xtc_project_trim_source_frames(xtc_project *project,uint64_t clip,unsigned int rate,size_t begin,size_t end);
#ifdef __cplusplus
}
#endif