feat: select audible sample boundaries with threshold and padding controls
This commit is contained in:
parent
ddef6cd73d
commit
392e437d32
8 changed files with 32 additions and 5 deletions
|
|
@ -22,6 +22,10 @@ typedef enum { XTC_SAMPLE_REVERSE, XTC_SAMPLE_INVERT, XTC_SAMPLE_REMOVE_DC, XTC_
|
|||
* One-frame fades reject; fade endpoints are exactly 0 and 1. Failure preserves *out. */
|
||||
xtc_result xtc_sample_process(const xtc_sample *sample,size_t begin,size_t end,
|
||||
xtc_sample_operation operation,double amount,xtc_sample **out);
|
||||
/* First/last sample strictly above linear threshold 0..1, padded and clamped
|
||||
* to the input range. All-silent returns NOT_FOUND; outputs unchanged on error. */
|
||||
xtc_result xtc_sample_audible_bounds(const xtc_sample *sample,size_t begin,size_t end,
|
||||
double threshold,size_t padding,size_t *first,size_t *last);
|
||||
/* Control-thread bounded mono float32 WAV save. Absolute path <512 bytes,
|
||||
* NEW destination only. Failure/cancel publishes nothing and removes temporary. */
|
||||
xtc_result xtc_sample_write(const xtc_sample *sample,size_t begin,size_t end,const char *path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue