Closed Polochon-street closed 4 years ago
Looks good to me.
Thx for the review!
However I think we should wait for https://github.com/aubio/aubio/pull/286 to be merged maybe? As I'm not sure what's should be true / false for silence_detection
Aubio library seems to be very passively maintained for now.
As I see retval == 1
means level under threshold i.e. silence:
https://github.com/aubio/aubio/blob/2eb52bd821788405d5e380c71249ac91d58d22ed/src/mathutils.c#L614-L618
Since this function called silence_detection
so true
should means silence I think.
0 != unsafe { ffi::aubio_silence_detection(input.as_ptr(), threshold) }
Oh, I see.
I've changed it, and also added on note on the comment. Thanks for looking into it!
I needed some stuff from https://aubio.org/doc/latest/musicutils_8h.html, so added it.
Not sure whether we should
use self::utils::*
, though (cause then we can directly doaubio_rs::utils_function()
, which seems a bit messy.Also not sure about making
silence_detection
's return value boolean, as it can be misleading?