Ignore:
Timestamp:
Apr 1, 2019, 1:30:06 AM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
7a02ce9
Parents:
5f57ea9 (diff), f55630c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/io/base-source_custom.h

    r5f57ea9 r439ba7b  
    9494  if (read != hop_size) return 1;
    9595
     96  // read again in undersized vector
     97  del_fvec(vec);
     98  vec = new_fvec(hop_size - 1);
     99  aubio_source_custom_do(s, vec, &read);
     100  if (read != hop_size - 1) return 1;
     101
     102  // read again in oversized vector
     103  del_fvec(vec);
     104  vec = new_fvec(hop_size + 1);
     105  aubio_source_custom_do(s, vec, &read);
     106  if (read != hop_size) return 1;
     107
    96108  // seek to 0
    97109  if(aubio_source_custom_seek(s, 0)) return 1;
    98110
    99111  // read again as multiple channels
     112  aubio_source_custom_do_multi(s, mat, &read);
     113  if (read != hop_size) return 1;
     114
     115  // read again as multiple channels in an undersized matrix
     116  del_fmat(mat);
     117  mat = new_fmat(channels - 1, hop_size);
     118  aubio_source_custom_do_multi(s, mat, &read);
     119  if (read != hop_size) return 1;
     120
     121  // read again as multiple channels in an undersized matrix
     122  del_fmat(mat);
     123  mat = new_fmat(channels, hop_size - 1);
     124  aubio_source_custom_do_multi(s, mat, &read);
     125  if (read != hop_size - 1) return 1;
     126
     127  // read again as multiple channels in an oversized matrix
     128  del_fmat(mat);
     129  mat = new_fmat(channels + 1, hop_size);
     130  aubio_source_custom_do_multi(s, mat, &read);
     131  if (read != hop_size) return 1;
     132
     133  // read again as multiple channels in an oversized matrix
     134  del_fmat(mat);
     135  mat = new_fmat(channels, hop_size + 1);
    100136  aubio_source_custom_do_multi(s, mat, &read);
    101137  if (read != hop_size) return 1;
     
    106142  aubio_source_custom_close(s);
    107143
     144  // reading after close fails
     145  del_fvec(vec);
     146  vec = new_fvec(hop_size);
     147  aubio_source_custom_do(s, vec, &read);
     148  del_fmat(mat);
     149  mat = new_fmat(channels, hop_size);
     150  aubio_source_custom_do_multi(s, mat, &read);
     151
    108152  del_aubio_source_custom(s);
    109153  del_fmat(mat);
    110154  del_fvec(vec);
     155
     156  // shouldn't crash on null (bypassed, only check del_aubio_source)
     157  // del_aubio_source_custom(NULL);
    111158
    112159  return run_on_default_source(base_main);
Note: See TracChangeset for help on using the changeset viewer.