Changeset 06dba46 for tests


Ignore:
Timestamp:
Dec 10, 2013, 2:39:47 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
df5eab4
Parents:
a7343ffe
Message:

wscript: small tweaks to with mingw32

Signed-off-by: Paul Brossier <piem@piem.org>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/utils_tests.h

    ra7343ffe r06dba46  
    44#include <math.h>
    55#include <assert.h>
     6#include "config.h"
    67
    78#define PRINT_ERR(format, args...)   fprintf(stderr, "AUBIO-TESTS ERROR: " format , ##args)
     
    910#define PRINT_DBG(format, args...)   fprintf(stderr, format , ##args)
    1011#define PRINT_WRN(format, args...)   fprintf(stderr, "AUBIO-TESTS WARNING: " format, ##args)
     12
     13#ifdef HAVE_WIN_HACKS
     14// http://en.wikipedia.org/wiki/Linear_congruential_generator
     15// no srandom/random on win32
     16
     17uint_t srandom_seed = 1029;
     18
     19void srandom(uint_t new_seed) {
     20    srandom_seed = new_seed;
     21}
     22
     23uint_t random(void) {
     24    srandom_seed = 1664525 * srandom_seed + 1013904223;
     25    return srandom_seed;
     26}
     27#endif
    1128
    1229void utils_init_random () {
Note: See TracChangeset for help on using the changeset viewer.