Changeset b2de03f for tests/src/temporal


Ignore:
Timestamp:
May 12, 2016, 8:05:34 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:
163d159
Parents:
1670f39
Message:

tests/src/temporal: avoid crash, clarify

Location:
tests/src/temporal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/temporal/test-a_weighting.c

    r1670f39 rb2de03f  
    2121  // samplerate unknown
    2222  f = new_aubio_filter_a_weighting (4200);
    23   del_aubio_filter (f);
     23  if (!f) {
     24    //PRINT_MSG ("failed creating A-weighting filter with samplerate=4200Hz\n");
     25  }
    2426
    2527  // order to small
    2628  f = new_aubio_filter (2);
    27   aubio_filter_set_a_weighting (f, samplerate);
     29  if (aubio_filter_set_a_weighting (f, samplerate) != 0) {
     30    //PRINT_MSG ("failed setting filter to A-weighting\n");
     31  }
    2832  del_aubio_filter (f);
    2933
    3034  // order to big
    3135  f = new_aubio_filter (12);
    32   aubio_filter_set_a_weighting (f, samplerate);
     36  if (aubio_filter_set_a_weighting (f, samplerate) != 0) {
     37    //PRINT_MSG ("failed setting filter to A-weighting\n");
     38  }
    3339  del_aubio_filter (f);
    3440
  • tests/src/temporal/test-c_weighting.c

    r1670f39 rb2de03f  
    2020  // samplerate unknown
    2121  f = new_aubio_filter_c_weighting (4200);
    22   del_aubio_filter (f);
     22  if (!f) {
     23    //PRINT_WRN ("failed creating C-weighting filter with samplerate=4200Hz");
     24  }
    2325
    2426  // order to small
    2527  f = new_aubio_filter (2);
    26   aubio_filter_set_c_weighting (f, samplerate);
     28  if (aubio_filter_set_c_weighting (f, samplerate) != 0) {
     29    //PRINT_WRN ("failed setting filter to C-weighting");
     30  }
    2731  del_aubio_filter (f);
    2832
    2933  // order to big
    3034  f = new_aubio_filter (12);
    31   aubio_filter_set_c_weighting (f, samplerate);
     35  if (aubio_filter_set_c_weighting (f, samplerate) != 0) {
     36    //PRINT_WRN ("failed setting filter to C-weighting");
     37  }
    3238  del_aubio_filter (f);
    3339
Note: See TracChangeset for help on using the changeset viewer.