comparison system/System.h @ 1222:771a17925576 piper

Merge from branch 3.0-integration
author Chris Cannam
date Thu, 20 Oct 2016 11:19:34 +0100
parents 794b64e62e58
children f350af2b542d
comparison
equal deleted inserted replaced
1214:77320e522253 1222:771a17925576
57 #define DEFAULT_LADSPA_PATH "%ProgramFiles%\\LADSPA Plugins;%ProgramFiles%\\Audacity\\Plug-Ins" 57 #define DEFAULT_LADSPA_PATH "%ProgramFiles%\\LADSPA Plugins;%ProgramFiles%\\Audacity\\Plug-Ins"
58 #define DEFAULT_DSSI_PATH "%ProgramFiles%\\DSSI Plugins" 58 #define DEFAULT_DSSI_PATH "%ProgramFiles%\\DSSI Plugins"
59 59
60 #define getpid _getpid 60 #define getpid _getpid
61 61
62 #if defined(_MSC_VER)
63 #include <BaseTsd.h>
64 typedef SSIZE_T ssize_t;
65 #endif
66
62 extern "C" { 67 extern "C" {
63 /* usleep is now in mingw 68
69 #ifdef _MSC_VER
64 void usleep(unsigned long usec); 70 void usleep(unsigned long usec);
65 */ 71 #endif
72
66 int gettimeofday(struct timeval *p, void *tz); 73 int gettimeofday(struct timeval *p, void *tz);
67 } 74 }
68 75
69 #define ISNAN std::isnan 76 #define ISNAN std::isnan
70 #define ISINF std::isinf 77 #define ISINF std::isinf
73 80
74 #include <sys/mman.h> 81 #include <sys/mman.h>
75 #include <dlfcn.h> 82 #include <dlfcn.h>
76 #include <stdio.h> // for perror 83 #include <stdio.h> // for perror
77 #include <cmath> 84 #include <cmath>
85 #include <unistd.h> // sleep + usleep primarily
78 86
79 #define MLOCK(a,b) ::mlock((a),(b)) 87 #define MLOCK(a,b) ::mlock((a),(b))
80 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) 88 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0)
81 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); 89 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
82 //#define MLOCK(a,b) 1 90 //#define MLOCK(a,b) 1