feat: remove selected audio DC offset with double precision analysis
This commit is contained in:
parent
f528a169f8
commit
9f1ff5f1e4
7 changed files with 20 additions and 8 deletions
|
|
@ -40,5 +40,10 @@ int main(void)
|
|||
assert(xtc_sample_process(q,1,7,XTC_SAMPLE_INVERT,0,&twice)==XTC_OK);
|
||||
for(size_t j=0;j<8;++j){assert(xtc_sample_read(twice,j,&v)==XTC_OK && v==values[j]);}
|
||||
xtc_sample_destroy(q);xtc_sample_destroy(twice);}
|
||||
{xtc_sample *q=NULL;xtc_sample_stats after;assert(xtc_sample_analyze(s,1,7,&stats)==XTC_OK);
|
||||
assert(xtc_sample_process(s,1,7,XTC_SAMPLE_REMOVE_DC,0,&q)==XTC_OK);
|
||||
assert(xtc_sample_analyze(q,1,7,&after)==XTC_OK && fabs(after.mean)<.000001);
|
||||
for(size_t j=0;j<8;++j){assert(xtc_sample_read(q,j,&v)==XTC_OK && fabs(v-(j>=1&&j<7 ? values[j]-stats.mean : values[j]))<.000001);}
|
||||
xtc_sample_destroy(q);}
|
||||
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