diff options
| -rw-r--r-- | plugingui/testmain.cc | 4 | ||||
| -rw-r--r-- | plugingui/tests/resizetest.cc | 4 | ||||
| -rw-r--r-- | plugingui/tests/tabwidgettest.cc | 4 | ||||
| -rw-r--r-- | src/mutex.h | 4 | ||||
| -rw-r--r-- | src/powerlist.cc | 6 | 
5 files changed, 15 insertions, 7 deletions
| diff --git a/plugingui/testmain.cc b/plugingui/testmain.cc index 07bbe6c..8edfd0a 100644 --- a/plugingui/testmain.cc +++ b/plugingui/testmain.cc @@ -24,7 +24,9 @@   *  along with DrumGizmo; if not, write to the Free Software   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.   */ -#ifdef WIN32 +#include <platform.h> + +#if DG_PLATFORM == DG_PLATFORM_WINDOWS  #define WIN32_LEAN_AND_MEAN  #include <windows.h>  #endif diff --git a/plugingui/tests/resizetest.cc b/plugingui/tests/resizetest.cc index 213cece..2267030 100644 --- a/plugingui/tests/resizetest.cc +++ b/plugingui/tests/resizetest.cc @@ -26,7 +26,9 @@   */  #include <iostream> -#ifdef WIN32 +#include <platform.h> + +#if DG_PLATFORM == DG_PLATFORM_WINDOWS  #define WIN32_LEAN_AND_MEAN  #include <windows.h>  #endif diff --git a/plugingui/tests/tabwidgettest.cc b/plugingui/tests/tabwidgettest.cc index 2ddabd3..e187fee 100644 --- a/plugingui/tests/tabwidgettest.cc +++ b/plugingui/tests/tabwidgettest.cc @@ -26,7 +26,9 @@   */  #include <iostream> -#ifdef WIN32 +#include <platform.h> + +#if DG_PLATFORM == DG_PLATFORM_WINDOWS  #define WIN32_LEAN_AND_MEAN  #include <windows.h>  #endif diff --git a/src/mutex.h b/src/mutex.h index 7e31296..067a4db 100644 --- a/src/mutex.h +++ b/src/mutex.h @@ -27,6 +27,8 @@   */  #pragma once +#include "platform.h" +  struct mutex_private_t;  class Mutex { @@ -42,7 +44,7 @@ private:  	struct mutex_private_t* prv;  }; -#ifdef WIN32 +#if DG_PLATFORM == DG_PLATFORM_WINDOWS  // Hack: mingw doesn't have std::mutex  namespace std {  	class mutex : public Mutex {}; diff --git a/src/powerlist.cc b/src/powerlist.cc index 9b0bd77..b502d03 100644 --- a/src/powerlist.cc +++ b/src/powerlist.cc @@ -48,7 +48,7 @@ unsigned int const MIN_SAMPLE_SET_SIZE = 26u;  // Enable to calculate power on old samples without power attribute  //#define AUTO_CALCULATE_POWER -unsigned int const SIZE = 500u; +unsigned int const LOAD_SIZE = 500u;  PowerList::PowerList(Random& rand)  	: rand(rand) @@ -82,7 +82,7 @@ Channel* PowerList::getMasterChannel()  			Channel* c = pair.first;  			AudioFile* af = pair.second; -			af->load(SIZE); +			af->load(LOAD_SIZE);  			float silence{0.f};  			std::size_t silence_length{4u}; @@ -176,7 +176,7 @@ void PowerList::finalise()  			DEBUG(powerlist, "Calculating power\n");  			float power{0.f}; -			for(auto s = 0u; s < SIZE && s < master->size; ++s) +			for(auto s = 0u; s < LOAD_SIZE && s < master->size; ++s)  			{  				power += master->data[s] * master->data[s];  			} | 
