Can we select the priority of MMCSS applied in the WASAPI out?

Apr 17, 2011 at 4:59 AM

e.g. such parameters:

AVRT_PRIORITY_CRITICAL (2)
AVRT_PRIORITY_HIGH (1)
AVRT_PRIORITY_LOW (-1)
AVRT_PRIORITY_NORMAL (0)

 

So can we customize it actually?

Coordinator
Apr 18, 2011 at 11:06 AM

NAudio doesn't have support for setting these values at the moment. You are free to modify the code yourself though.

Mark

Apr 18, 2011 at 11:33 AM

All are just inside the avrt.dll or avrt.h

and you may have a look here:
http://msdn.microsoft.com/en-us/library/ms684847(v=VS.85).aspx#thread_ordering_service_functions

And all the functions of MMCSS have the initial of "Av"

especially the most useful function:

BOOL WINAPI AvSetMmThreadPriority(
  __in  HANDLE AvrtHandle,
  __in  AVRT_PRIORITY Priority
);