feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since c0916f2 was
474a573,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
tests/utils_tests.h: add utils_init_random
|
-
Property mode set to
100644
|
File size:
611 bytes
|
Line | |
---|
1 | #include <time.h> |
---|
2 | #include <stdlib.h> |
---|
3 | #include <stdio.h> |
---|
4 | #include <math.h> |
---|
5 | #include <assert.h> |
---|
6 | |
---|
7 | #define PRINT_ERR(format, args...) fprintf(stderr, "AUBIO-TESTS ERROR: " format , ##args) |
---|
8 | #define PRINT_MSG(format, args...) fprintf(stdout, format , ##args) |
---|
9 | #define PRINT_DBG(format, args...) fprintf(stderr, format , ##args) |
---|
10 | #define PRINT_WRN(format, args...) fprintf(stderr, "AUBIO-TESTS WARNING: " format, ##args) |
---|
11 | |
---|
12 | void utils_init_random () { |
---|
13 | time_t now = time(0); |
---|
14 | struct tm *tm_struct = localtime(&now); |
---|
15 | int seed = tm_struct->tm_sec; |
---|
16 | //PRINT_WRN("current seed: %d\n", seed); |
---|
17 | srandom (seed); |
---|
18 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.