mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 17:37:41 +01:00
[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
e08169f1c2
commit
e9ab160ff3
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue