G
Guest
Hello everyone:
I am normally not an advocate of increasing the priority of a running
process or of a thread but it looks like I have to choice. I'm writing a
small app that plays a line-in signal via speakers using low level Digital
Audio API and as you can imagine it is quite time critical. The app works
fine when computer is idle but then even when I minimize a window (any
window), let alone do something more involving the play-back breaks with
crackling.
I came up with an idea to place the whole "low level Digital Audio" in a
thread and start it with the THREAD_PRIORITY_TIME_CRITICAL, but it didn't
really help much because the Base Priority wasn't set to the
THREAD_PRIORITY_TIME_CRITICAL due to Priority Class of the process still
being low. I truly don't want to change Priority Class of the app itself as
it will render the whole system slow.
I thought to put the "low level Digital Audio" part into DLL but it sounds
like DLL is loaded into a process space it is called from, thus I won't be
able to increase Priority Class for the process either without affecting my
main app. Am I write?
What else would you gurus suggest? I don't want to start coding and go into
a wrong direction...
Thank you in advance.
I am normally not an advocate of increasing the priority of a running
process or of a thread but it looks like I have to choice. I'm writing a
small app that plays a line-in signal via speakers using low level Digital
Audio API and as you can imagine it is quite time critical. The app works
fine when computer is idle but then even when I minimize a window (any
window), let alone do something more involving the play-back breaks with
crackling.
I came up with an idea to place the whole "low level Digital Audio" in a
thread and start it with the THREAD_PRIORITY_TIME_CRITICAL, but it didn't
really help much because the Base Priority wasn't set to the
THREAD_PRIORITY_TIME_CRITICAL due to Priority Class of the process still
being low. I truly don't want to change Priority Class of the app itself as
it will render the whole system slow.
I thought to put the "low level Digital Audio" part into DLL but it sounds
like DLL is loaded into a process space it is called from, thus I won't be
able to increase Priority Class for the process either without affecting my
main app. Am I write?
What else would you gurus suggest? I don't want to start coding and go into
a wrong direction...
Thank you in advance.