mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 05:36:31 +01:00
Add debug output for errors when setting MMCSS thread characteristics
This commit is contained in:
parent
3618689103
commit
7521028831
2 changed files with 21 additions and 0 deletions
|
|
@ -118,6 +118,22 @@ set_thread_characteristics (const std::string& task_name, HANDLE* task_handle)
|
||||||
if (*task_handle == 0) {
|
if (*task_handle == 0) {
|
||||||
DEBUG_THREADS (string_compose ("Failed to set Thread Characteristics to %1\n",
|
DEBUG_THREADS (string_compose ("Failed to set Thread Characteristics to %1\n",
|
||||||
task_name));
|
task_name));
|
||||||
|
DWORD error = GetLastError();
|
||||||
|
|
||||||
|
switch (error) {
|
||||||
|
case ERROR_INVALID_TASK_INDEX:
|
||||||
|
DEBUG_THREADS("MMCSS: Invalid Task Index\n");
|
||||||
|
break;
|
||||||
|
case ERROR_INVALID_TASK_NAME:
|
||||||
|
DEBUG_THREADS("MMCSS: Invalid Task Name\n");
|
||||||
|
break;
|
||||||
|
case ERROR_PRIVILEGE_NOT_HELD:
|
||||||
|
DEBUG_THREADS("MMCSS: Privilege not held\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DEBUG_THREADS("MMCSS: Unknown error setting thread characteristics\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,11 @@ enum AVRT_PRIORITY {
|
||||||
AVRT_PRIORITY_CRITICAL
|
AVRT_PRIORITY_CRITICAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum error_codes {
|
||||||
|
ERROR_INVALID_TASK_NAME = 1550,
|
||||||
|
ERROR_INVALID_TASK_INDEX = 1551
|
||||||
|
};
|
||||||
|
|
||||||
bool initialize ();
|
bool initialize ();
|
||||||
|
|
||||||
bool deinitialize ();
|
bool deinitialize ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue