- Timestamp:
- May 10, 2019, 10:11:03 AM (6 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
- Children:
- 9279ba0
- Parents:
- 65f7886
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/effects/test-timestretch.c
r65f7886 rc62243f 1 1 #define AUBIO_UNSTABLE 1 2 2 #include <aubio.h> 3 #include "aubio_priv.h" 3 4 #include "utils_tests.h" 4 5 … … 128 129 if (aubio_timestretch_get_transpose(p) != 0) return 1; 129 130 if (aubio_timestretch_set_transpose(p, 2.)) return 1; 130 if ( fabsf(aubio_timestretch_get_transpose(p) - 2.) >= 1e-6) return 1;131 if (ABS(aubio_timestretch_get_transpose(p) - 2.) > 1.e-6) return 1; 131 132 if (!aubio_timestretch_set_transpose(p, 200.)) return 1; 132 133 if (!aubio_timestretch_set_transpose(p, -200.)) return 1; … … 135 136 if (aubio_timestretch_get_pitchscale(p) != 1) return 1; 136 137 if (aubio_timestretch_set_pitchscale(p, 2.)) return 1; 137 if ( fabsf(aubio_timestretch_get_pitchscale(p) - 2.) >= 1e-6) return 1;138 if (ABS(aubio_timestretch_get_pitchscale(p) - 2.) > 1.e-6) return 1; 138 139 if (!aubio_timestretch_set_pitchscale(p, 0.)) return 1; 139 140 if (!aubio_timestretch_set_pitchscale(p, 6.)) return 1; … … 141 142 if (aubio_timestretch_get_stretch(p) != stretch) return 1; 142 143 if (aubio_timestretch_set_stretch(p, 2.)) return 1; 143 if ( fabsf(aubio_timestretch_get_stretch(p) - 2.) >= 1e-6) return 1;144 if (ABS(aubio_timestretch_get_stretch(p) - 2.) > 1.e-6) return 1; 144 145 if (!aubio_timestretch_set_stretch(p, 0.)) return 1; 145 146 if (!aubio_timestretch_set_stretch(p, 41.)) return 1;
Note: See TracChangeset
for help on using the changeset viewer.