Changeset ad1df9b


Ignore:
Timestamp:
Apr 21, 2016, 7:03:58 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
e9bd022
Parents:
26a6af7
Message:

src/mathutils.*: more const qualifiers

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    r26a6af7 rad1df9b  
    292292
    293293smpl_t
    294 aubio_level_lin (fvec_t * f)
     294aubio_level_lin (const fvec_t * f)
    295295{
    296296  smpl_t energy = 0.;
     
    441441}
    442442
    443 smpl_t fvec_quadratic_peak_pos (fvec_t * x, uint_t pos) {
     443smpl_t fvec_quadratic_peak_pos (const fvec_t * x, uint_t pos) {
    444444  smpl_t s0, s1, s2; uint_t x0, x2;
    445445  smpl_t half = .5, two = 2.;
     
    466466}
    467467
    468 uint_t fvec_peakpick(fvec_t * onset, uint_t pos) {
     468uint_t fvec_peakpick(const fvec_t * onset, uint_t pos) {
    469469  uint_t tmp=0;
    470470  tmp = (onset->data[pos] > onset->data[pos-1]
     
    553553
    554554smpl_t
    555 aubio_db_spl (fvec_t * o)
     555aubio_db_spl (const fvec_t * o)
    556556{
    557557  return 10. * LOG10 (aubio_level_lin (o));
     
    559559
    560560uint_t
    561 aubio_silence_detection (fvec_t * o, smpl_t threshold)
     561aubio_silence_detection (const fvec_t * o, smpl_t threshold)
    562562{
    563563  return (aubio_db_spl (o) < threshold);
     
    599599
    600600void
    601 aubio_autocorr (fvec_t * input, fvec_t * output)
     601aubio_autocorr (const fvec_t * input, fvec_t * output)
    602602{
    603603  uint_t i, j, length = input->length;
  • src/mathutils.h

    r26a6af7 rad1df9b  
    251251
    252252*/
    253 smpl_t fvec_quadratic_peak_pos (fvec_t * x, uint_t p);
     253smpl_t fvec_quadratic_peak_pos (const fvec_t * x, uint_t p);
    254254
    255255/** finds magnitude of peak by quadratic interpolation
     
    294294
    295295*/
    296 uint_t fvec_peakpick (fvec_t * v, uint_t p);
     296uint_t fvec_peakpick (const fvec_t * v, uint_t p);
    297297
    298298/** return 1 if a is a power of 2, 0 otherwise */
     
    308308
    309309*/
    310 void aubio_autocorr (fvec_t * input, fvec_t * output);
     310void aubio_autocorr (const fvec_t * input, fvec_t * output);
    311311
    312312#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.