Changeset 69f74f0 for src/tempo


Ignore:
Timestamp:
Apr 21, 2016, 7:09:47 PM (9 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:
23493b5
Parents:
55d1fa4
Message:

src/tempo/: add const qualifiers

Location:
src/tempo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/beattracking.c

    r55d1fa4 r69f74f0  
    124124
    125125void
    126 aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframe,
     126aubio_beattracking_do (aubio_beattracking_t * bt, const fvec_t * dfframe,
    127127    fvec_t * output)
    128128{
     
    410410
    411411smpl_t
    412 aubio_beattracking_get_period (aubio_beattracking_t * bt)
     412aubio_beattracking_get_period (const aubio_beattracking_t * bt)
    413413{
    414414  return bt->hop_size * bt->bp;
     
    416416
    417417smpl_t
    418 aubio_beattracking_get_period_s (aubio_beattracking_t * bt)
     418aubio_beattracking_get_period_s (const aubio_beattracking_t * bt)
    419419{
    420420  return aubio_beattracking_get_period(bt) / (smpl_t) bt->samplerate;
     
    422422
    423423smpl_t
    424 aubio_beattracking_get_bpm (aubio_beattracking_t * bt)
     424aubio_beattracking_get_bpm (const aubio_beattracking_t * bt)
    425425{
    426426  if (bt->bp != 0) {
     
    432432
    433433smpl_t
    434 aubio_beattracking_get_confidence (aubio_beattracking_t * bt)
     434aubio_beattracking_get_confidence (const aubio_beattracking_t * bt)
    435435{
    436436  if (bt->gp) {
  • src/tempo/beattracking.h

    r55d1fa4 r69f74f0  
    6565
    6666*/
    67 void aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframes,
     67void aubio_beattracking_do (aubio_beattracking_t * bt, const fvec_t * dfframes,
    6868    fvec_t * out);
    6969
     
    7676
    7777*/
    78 smpl_t aubio_beattracking_get_period (aubio_beattracking_t * bt);
     78smpl_t aubio_beattracking_get_period (const aubio_beattracking_t * bt);
    7979
    8080/** get current beat period in seconds
     
    8686
    8787*/
    88 smpl_t aubio_beattracking_get_period_s (aubio_beattracking_t * bt);
     88smpl_t aubio_beattracking_get_period_s (const aubio_beattracking_t * bt);
    8989
    9090/** get current tempo in bpm
     
    9696
    9797*/
    98 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
     98smpl_t aubio_beattracking_get_bpm(const aubio_beattracking_t * bt);
    9999
    100100/** get current tempo confidence
     
    106106
    107107*/
    108 smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * bt);
     108smpl_t aubio_beattracking_get_confidence(const aubio_beattracking_t * bt);
    109109
    110110/** delete beat tracking object
  • src/tempo/tempo.c

    r55d1fa4 r69f74f0  
    5555
    5656/* execute tempo detection function on iput buffer */
    57 void aubio_tempo_do(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo)
     57void aubio_tempo_do(aubio_tempo_t *o, const fvec_t * input, fvec_t * tempo)
    5858{
    5959  uint_t i;
     
    164164
    165165/* Allocate memory for an tempo detection */
    166 aubio_tempo_t * new_aubio_tempo (char_t * tempo_mode,
     166aubio_tempo_t * new_aubio_tempo (const char_t * tempo_mode,
    167167    uint_t buf_size, uint_t hop_size, uint_t samplerate)
    168168{
  • src/tempo/tempo.h

    r55d1fa4 r69f74f0  
    5151
    5252*/
    53 aubio_tempo_t * new_aubio_tempo (char_t * method,
     53aubio_tempo_t * new_aubio_tempo (const char_t * method,
    5454    uint_t buf_size, uint_t hop_size, uint_t samplerate);
    5555
     
    6161
    6262*/
    63 void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);
     63void aubio_tempo_do (aubio_tempo_t *o, const fvec_t * input, fvec_t * tempo);
    6464
    6565/** get the time of the latest beat detected, in samples
Note: See TracChangeset for help on using the changeset viewer.