Make check for new Lilv optional.
[ardour.git] / libs / rubberband / src / sysutils.h
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2
3 /*
4     Rubber Band
5     An audio time-stretching and pitch-shifting library.
6     Copyright 2007-2008 Chris Cannam.
7     
8     This program is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License as
10     published by the Free Software Foundation; either version 2 of the
11     License, or (at your option) any later version.  See the file
12     COPYING included with this distribution for more information.
13 */
14
15 #ifndef _RUBBERBAND_SYSINFO_H_
16 #define _RUBBERBAND_SYSINFO_H_
17
18 #ifdef __MSVC__
19 #include "bsd-3rdparty/float_cast/float_cast.h"
20 #define R__ __restrict
21 #endif
22
23 #ifdef __GNUC__
24 #define R__ __restrict__
25 #endif
26
27 #ifndef R__
28 #define R__
29 #endif
30
31 #ifdef __MINGW32__
32 #include <malloc.h>
33 #endif
34
35 #ifdef __MSVC__
36 #define alloca _alloca
37 #endif
38
39 namespace RubberBand {
40
41 extern bool system_is_multiprocessor();
42
43 #ifdef _WIN32
44
45 struct timeval { long tv_sec; long tv_usec; };
46 int gettimeofday(struct timeval *p, void *tz);
47
48 void usleep(unsigned long);
49
50 #endif
51
52 extern float *allocFloat(int);    
53 extern float *allocFloat(float *, int);
54 extern void freeFloat(float *);
55
56 extern double *allocDouble(int);    
57 extern double *allocDouble(double *, int);
58 extern void freeDouble(double *);
59
60 }
61
62 #endif