From e9ab160ff35cd81e8a394570682a5918f17b08c6 Mon Sep 17 00:00:00 2001 From: Greg Zharun Date: Tue, 23 Dec 2014 17:43:02 +0200 Subject: [PATCH] [Summary] Fixed audio export on Windows. Added support of windows platform for the function that calculated hardware concurrency. Because there was no implementation for this function on windows it used to return 0. This meant that no thread was created to process the data. --- libs/pbd/cpus.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/pbd/cpus.cc b/libs/pbd/cpus.cc index 0f73d51027..ffb11871ba 100644 --- a/libs/pbd/cpus.cc +++ b/libs/pbd/cpus.cc @@ -28,6 +28,8 @@ #include #include #include +#elif defined(PLATFORM_WINDOWS) +#include #endif #include "pbd/cpus.h" @@ -48,6 +50,10 @@ hardware_concurrency() #elif defined(HAVE_UNISTD) && defined(_SC_NPROCESSORS_ONLN) int const count=sysconf(_SC_NPROCESSORS_ONLN); return (count>0)?count:0; +#elif defined(PLATFORM_WINDOWS) + SYSTEM_INFO sys_info; + GetSystemInfo( &sys_info ); + return sys_info.dwNumberOfProcessors; #else return 0; #endif