comparison base/System.h @ 86:e076e676439b

* Add file open/save operations to main toolbar * Allow opening any sort of file from toolbar file open function * First cut at on-disc cacheing for decoded mp3/ogg files * Permit un-snapped selection by holding Shift
author Chris Cannam
date Thu, 27 Apr 2006 17:29:19 +0000
parents b2067aff8cd6
children 604bd4ee3ed4
comparison
equal deleted inserted replaced
85:ea730e3f9ace 86:e076e676439b
43 #include <sys/mman.h> 43 #include <sys/mman.h>
44 #include <dlfcn.h> 44 #include <dlfcn.h>
45 45
46 #define MLOCK(a,b) ::mlock((a),(b)) 46 #define MLOCK(a,b) ::mlock((a),(b))
47 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) 47 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0)
48 #define MUNLOCK_SAMPLEBLOCK(a) do { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } while(0); 48 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
49 49
50 #define DLOPEN(a,b) dlopen((a).toStdString().c_str(),(b)) 50 #define DLOPEN(a,b) dlopen((a).toStdString().c_str(),(b))
51 #define DLSYM(a,b) dlsym((a),(b)) 51 #define DLSYM(a,b) dlsym((a),(b))
52 #define DLCLOSE(a) dlclose((a)) 52 #define DLCLOSE(a) dlclose((a))
53 #define DLERROR() dlerror() 53 #define DLERROR() dlerror()