Changes in src/pitch/pitch.c [ce3ff2b:afa21cdc]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitch/pitch.c
rce3ff2b rafa21cdc 97 97 static void aubio_pitch_do_specacf (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 98 98 99 /* conversion functions for frequency conversions*/100 s mpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize);101 s mpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize);102 s mpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize);99 /* internal functions for frequency conversion */ 100 static smpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize); 101 static smpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize); 102 static smpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize); 103 103 104 104 /* adapter to stack ibuf new samples at the end of buf, and trim `buf` to `bufsize` */ … … 127 127 pitch_type = aubio_pitcht_default; 128 128 else { 129 AUBIO_ERR ("unknown pitch detection method %s, using default.\n", 130 pitch_mode); 131 pitch_type = aubio_pitcht_default; 129 AUBIO_ERR ("pitch: unknown pitch detection method ‘%s’\n", pitch_mode); 130 goto beach; 132 131 } 133 132 … … 284 283 pitch_mode = aubio_pitchm_default; 285 284 else { 286 AUBIO_ERR ("unknown pitch detection unit %s, using default\n", pitch_unit); 285 AUBIO_WRN("pitch: unknown pitch detection unit ‘%s’, using default\n", 286 pitch_unit); 287 287 pitch_mode = aubio_pitchm_default; 288 288 err = AUBIO_FAIL; … … 325 325 } 326 326 327 smpl_t 328 aubio_pitch_get_tolerance (aubio_pitch_t * p) 329 { 330 smpl_t tolerance = 1.; 331 switch (p->type) { 332 case aubio_pitcht_yin: 333 tolerance = aubio_pitchyin_get_tolerance (p->p_object); 334 break; 335 case aubio_pitcht_yinfft: 336 tolerance = aubio_pitchyinfft_get_tolerance (p->p_object); 337 break; 338 default: 339 break; 340 } 341 return tolerance; 342 } 343 327 344 uint_t 328 345 aubio_pitch_set_silence (aubio_pitch_t * p, smpl_t silence) … … 332 349 return AUBIO_OK; 333 350 } else { 334 AUBIO_ ERR("pitch: could not set silence to %.2f", silence);351 AUBIO_WRN("pitch: could not set silence to %.2f\n", silence); 335 352 return AUBIO_FAIL; 336 353 }
Note: See TracChangeset
for help on using the changeset viewer.