Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/base/System.h Thu Apr 27 11:49:34 2006 +0000 +++ b/base/System.h Thu Apr 27 17:29:19 2006 +0000 @@ -45,7 +45,7 @@ #define MLOCK(a,b) ::mlock((a),(b)) #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) -#define MUNLOCK_SAMPLEBLOCK(a) do { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } while(0); +#define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); #define DLOPEN(a,b) dlopen((a).toStdString().c_str(),(b)) #define DLSYM(a,b) dlsym((a),(b))