Changeset f530f12 for src/temporal


Ignore:
Timestamp:
Oct 5, 2009, 12:30:32 AM (15 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:
eebb0e1
Parents:
ccf8b77
Message:

src/temporal/{a,c}_weighting.{c,h}: set_a,c_weighting return 1 on error, 0 on success

Location:
src/temporal
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/temporal/a_weighting.c

    rccf8b77 rf530f12  
    2727#include "temporal/a_weighting.h"
    2828
    29 void aubio_filter_set_a_weighting (aubio_filter_t * f) {
     29uint_t aubio_filter_set_a_weighting (aubio_filter_t * f) {
    3030
    3131  uint_t samplerate = aubio_filter_get_samplerate (f);
     
    3737  if ( order != 7 ) {
    3838    AUBIO_ERROR ( "order of A-weighting filter must be 7, not %d\n", order );
    39     return;
     39    return 1;
    4040  }
    4141
     
    245245 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, 192000.\n",
    246246 samplerate );
    247       break;
     247      return 1;
    248248
    249249  }
    250250
     251  return 0;
    251252}
    252253
  • src/temporal/a_weighting.h

    rccf8b77 rf530f12  
    7676
    7777*/
    78 void aubio_filter_set_a_weighting (aubio_filter_t *f);
     78uint_t aubio_filter_set_a_weighting (aubio_filter_t *f);
    7979
    8080#ifdef __cplusplus
  • src/temporal/c_weighting.c

    rccf8b77 rf530f12  
    2626#include "temporal/c_weighting.h"
    2727
    28 void aubio_filter_set_c_weighting (aubio_filter_t * f) {
     28uint_t aubio_filter_set_c_weighting (aubio_filter_t * f) {
    2929
    3030  uint_t samplerate = aubio_filter_get_samplerate (f);
     
    3636  if ( order != 5 ) {
    3737    AUBIO_ERROR ( "order of C-weighting filter must be 5, not %d\n", order );
    38     return;
     38    return 1;
    3939  }
    4040
     
    200200 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, 192000.\n",
    201201 samplerate );
    202       break;
     202      return 1;
    203203
    204204  }
    205205
     206  return 0;
    206207}
    207208
  • src/temporal/c_weighting.h

    rccf8b77 rf530f12  
    7676
    7777*/
    78 void aubio_filter_set_c_weighting (aubio_filter_t *f);
     78uint_t aubio_filter_set_c_weighting (aubio_filter_t *f);
    7979
    8080#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.