[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:
parent
ea2e80f298
commit
aa80515f3f
@ -28,6 +28,8 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
#elif defined(PLATFORM_WINDOWS)
|
||||||
|
#include <Windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pbd/cpus.h"
|
#include "pbd/cpus.h"
|
||||||
@ -48,6 +50,10 @@ hardware_concurrency()
|
|||||||
#elif defined(HAVE_UNISTD) && defined(_SC_NPROCESSORS_ONLN)
|
#elif defined(HAVE_UNISTD) && defined(_SC_NPROCESSORS_ONLN)
|
||||||
int const count=sysconf(_SC_NPROCESSORS_ONLN);
|
int const count=sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
return (count>0)?count:0;
|
return (count>0)?count:0;
|
||||||
|
#elif defined(PLATFORM_WINDOWS)
|
||||||
|
SYSTEM_INFO sys_info;
|
||||||
|
GetSystemInfo( &sys_info );
|
||||||
|
return sys_info.dwNumberOfProcessors;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user