mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Emit Signal when MCSS Threads are exhausted
By default Windows has limit of 32 MMCSS threads. Ardour uses MMCSS scheduling for for hardware I/O (audio and MIDI) as well as for realtime process threads, and a user on a recent machine may run into this limit.
This commit is contained in:
parent
cf14fe75f2
commit
92bcddb437
2 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "pbd/signals.h"
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
|
|
||||||
namespace PBD {
|
namespace PBD {
|
||||||
|
|
@ -55,6 +56,8 @@ bool LIBPBD_API revert_thread_characteristics (HANDLE task_handle);
|
||||||
|
|
||||||
bool LIBPBD_API set_thread_priority (HANDLE, AVRT_PRIORITY);
|
bool LIBPBD_API set_thread_priority (HANDLE, AVRT_PRIORITY);
|
||||||
|
|
||||||
|
extern Signal<void()> MMCSSError;
|
||||||
|
|
||||||
} // namespace MMCSS
|
} // namespace MMCSS
|
||||||
|
|
||||||
} // namespace PBD
|
} // namespace PBD
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ namespace PBD {
|
||||||
|
|
||||||
namespace MMCSS {
|
namespace MMCSS {
|
||||||
|
|
||||||
|
Signal<void()> MMCSSError;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
initialize ()
|
initialize ()
|
||||||
{
|
{
|
||||||
|
|
@ -133,6 +135,8 @@ set_thread_characteristics (const std::string& task_name, HANDLE* task_handle)
|
||||||
DEBUG_THREADS("MMCSS: Privilege not held\n");
|
DEBUG_THREADS("MMCSS: Privilege not held\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
/* this is likely because the maximum number of MMCSS threads has been reached */
|
||||||
|
MMCSSError (); /* EMIT SIGNAL */
|
||||||
DEBUG_THREADS("MMCSS: Unknown error setting thread characteristics\n");
|
DEBUG_THREADS("MMCSS: Unknown error setting thread characteristics\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue