FCriticalPerformanceEnabler.
More...
#include <fcriticalperformance.h>
| void * useCriticalPerformanceMode |
( |
const Performance::Mode & |
mode, |
|
|
uint64 |
timeConstraintNanoSeconds, |
|
|
void * |
handle |
|
) |
| |
On Windows systems, this function associates the calling thread with the Windows Vista Pro Audio task.
On Mac systems, it uses the THREAD_TIME_CONSTRAINT_POLICY for the calling thread. Use "criticalPriority" for maximum priority. Windows: It returns the handle to the associated pro audio task. This handle must be used for subsequent calls - otherwise the thread priority might not be set correctly! Mac: Disabling is not supported. You'll need to terminate the tread (and create a new one if wanted). Note: this method must be called within the thread that should be associated, because the priority of the calling thread will be changed! WARNING: On Windows, calling this method may release the cpu affinity! If needed, set the affinity afterwards again.
- Parameters
-
| mode | TODO. |
| timeConstraintNanoSeconds | time constraint for THREAD_TIME_CONSTRAINT_POLICY (Mac only) |
| handle | see description (Win only) |
- Returns
- see description (Win only)
| bool isCriticalPerformanceModeSupported |
( |
| ) |
|
Checks if Windows Vista Pro Audio task is supported.
(win only)
- Returns
- true if supported (Mac always returns true)