Changeset 05774ba3 for tests/src


Ignore:
Timestamp:
Dec 17, 2018, 3:14:39 PM (6 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/timestretch, fix/ffmpeg5, master
Children:
12e5d89, d81e16d
Parents:
0512fca
Message:

[tests] improve test-sink

Location:
tests/src/io
Files:
5 edited

Legend:

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

    r0512fca r05774ba3  
    117117  if (aubio_sink_custom_preset_samplerate(s, samplerate)) return 1;
    118118
     119  if (aubio_sink_custom_get_samplerate(s) != samplerate) return 1;
     120  if (aubio_sink_custom_get_channels(s) != channels) return 1;
     121
    119122  mat = new_fmat(channels, hop_size);
    120123  // check writing a vector with valid length
    121124  aubio_sink_custom_do_multi(s, mat, hop_size);
     125  // check writing 0 frames
     126  aubio_sink_custom_do_multi(s, mat, 0);
    122127  // check writing more than in the input
    123128  aubio_sink_custom_do_multi(s, mat, hop_size+1);
  • tests/src/io/test-sink.c

    r0512fca r05774ba3  
    113113  if (aubio_sink_preset_samplerate(s, samplerate)) return 1;
    114114
     115  if (aubio_sink_get_samplerate(s) != samplerate) return 1;
     116  if (aubio_sink_get_channels(s) != channels) return 1;
     117
    115118  mat = new_fmat(channels, hop_size);
    116119  // check writing a vector with valid length
    117120  aubio_sink_do_multi(s, mat, hop_size);
     121  // check writing 0 frames
     122  aubio_sink_do_multi(s, mat, 0);
    118123  // check writing more than in the input
    119124  aubio_sink_do_multi(s, mat, hop_size+1);
  • tests/src/io/test-sink_apple_audio.c

    r0512fca r05774ba3  
    1515#define aubio_sink_custom_preset_samplerate aubio_sink_apple_audio_preset_samplerate
    1616#define aubio_sink_custom_preset_channels aubio_sink_apple_audio_preset_channels
     17#define aubio_sink_custom_get_samplerate aubio_sink_apple_audio_get_samplerate
     18#define aubio_sink_custom_get_channels aubio_sink_apple_audio_get_channels
    1719#endif /* HAVE_SINK_APPLE_AUDIO */
    1820
  • tests/src/io/test-sink_sndfile.c

    r0512fca r05774ba3  
    1515#define aubio_sink_custom_preset_samplerate aubio_sink_sndfile_preset_samplerate
    1616#define aubio_sink_custom_preset_channels aubio_sink_sndfile_preset_channels
     17#define aubio_sink_custom_get_samplerate aubio_sink_sndfile_get_samplerate
     18#define aubio_sink_custom_get_channels aubio_sink_sndfile_get_channels
    1719#endif /* HAVE_SNDFILE */
    1820
  • tests/src/io/test-sink_wavwrite.c

    r0512fca r05774ba3  
    1515#define aubio_sink_custom_preset_samplerate aubio_sink_wavwrite_preset_samplerate
    1616#define aubio_sink_custom_preset_channels aubio_sink_wavwrite_preset_channels
     17#define aubio_sink_custom_get_samplerate aubio_sink_wavwrite_get_samplerate
     18#define aubio_sink_custom_get_channels aubio_sink_wavwrite_get_channels
    1719#endif /* HAVE_WAVWRITE */
    1820
Note: See TracChangeset for help on using the changeset viewer.