Changeset 7bb5cef for tests/src


Ignore:
Timestamp:
Dec 19, 2013, 11:24:01 PM (11 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:
50bb325
Parents:
6465d7f
Message:

src/io/source_sndfile.c: fix resampled position in _seek, improve test for non integer ratios

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/io/test-source_seek.c

    r6465d7f r7bb5cef  
    8585  del_fvec (vec);
    8686
     87  // check that we got exactly the same number of frames
    8788  assert ( old_n_frames_2 == old_n_frames_1 );
    88   assert ( old_n_frames_3 == (uint_t)floor(old_n_frames_1 / 2. + .5) );
     89  // check that we got about half the frames, with 3 decimals
     90  assert ( roundf(1.e3 * old_n_frames_1 / old_n_frames_3) / 1.e3 == 2.);
    8991  return err;
    9092}
Note: See TracChangeset for help on using the changeset viewer.