Update of /cvsroot/audacity/audacity-src/src/blockfile
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23232/src/blockfile

Modified Files:
        SimpleBlockFile.cpp 
Log Message:
Actually make the memory check work this time around.

Index: SimpleBlockFile.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/blockfile/SimpleBlockFile.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- SimpleBlockFile.cpp 12 Nov 2009 01:15:37 -0000      1.32
+++ SimpleBlockFile.cpp 12 Nov 2009 03:54:27 -0000      1.33
@@ -74,10 +74,6 @@
 #include "sndfile.h"
 #include "../Internat.h"
 
-#if defined(__WXMAC__)
-#include <sys/sysctl.h>
-#endif
-
 //#define DEBUG_OUTPUT(s) printf("[SimpleBlockFile] %s\n", s)
 #define DEBUG_OUTPUT(s)
 
@@ -603,18 +599,7 @@
    }
    lowMem <<= 20;
 
-   wxMemorySize avail;
-
-#if defined(__WXMAC__)
-   uint64_t mem = 0;
-   size_t len = sizeof(uint64_t);
-   sysctlbyname("hw.memsize", &mem, &len, NULL, 0);
-   avail = mem;
-#else
-   avail = wxGetFreeMemory();
-#endif
-
-   return cacheBlockFiles && (avail > lowMem);
+   return cacheBlockFiles && (GetFreeMemory() > lowMem);
 }
 
 // Indentation settings for Vim and Emacs and unique identifier for Arch, a


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to