pacemaker
3.0.3
COM automation for people with deadlines and a hatred of GUIs
Loading...
Searching...
No Matches
AvSetMmThreadOptions.hpp
Go to the documentation of this file.
1
#ifndef PACEMAKER_TIMER_AVSETMMTHREADOPTIONS_HPP_
2
#define PACEMAKER_TIMER_AVSETMMTHREADOPTIONS_HPP_
3
4
#include <avrt.h>
5
6
namespace
pacemaker::timer
7
{
27
struct
AvSetMmThreadOptions
28
{
37
auto
av_set
() ->
void
38
{
39
DWORD taskIndex{0};
40
this->hTask = AvSetMmThreadCharacteristics(TEXT(
"Pro Audio"
), &taskIndex);
41
AvSetMmThreadPriority(this->hTask, AVRT_PRIORITY_HIGH);
42
}
43
50
auto
av_revert
() ->
void
{ AvRevertMmThreadCharacteristics(this->hTask); }
51
52
private
:
54
HANDLE hTask;
55
};
56
}
// namespace pacemaker::timer
57
58
#endif
// PACEMAKER_TIMER_AVSETMMTHREADOPTIONS_HPP_
pacemaker::timer
Definition
Timer.hpp:10
pacemaker::timer::AvSetMmThreadOptions
Helper class for Windows Multimedia Scheduler Service (MMCSS) thread elevation.
Definition
AvSetMmThreadOptions.hpp:28
pacemaker::timer::AvSetMmThreadOptions::av_set
auto av_set() -> void
Elevates the calling thread to the MMCSS "Pro Audio" task.
Definition
AvSetMmThreadOptions.hpp:37
pacemaker::timer::AvSetMmThreadOptions::av_revert
auto av_revert() -> void
Reverts the calling thread's MMCSS scheduling characteristics.
Definition
AvSetMmThreadOptions.hpp:50
src
pacemaker
timer
AvSetMmThreadOptions.hpp
Generated by
1.12.0