13
0

[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.
This commit is contained in:
Greg Zharun 2014-12-23 17:43:02 +02:00 committed by Paul Davis
parent ea2e80f298
commit aa80515f3f

View File

@ -28,6 +28,8 @@
#include <stddef.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#elif defined(PLATFORM_WINDOWS)
#include <Windows.h>
#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