mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
Updated Timer code to avoid a rare messaging problem. Fixed a couple of minor build errors. Rearranged the atomic functions and added a new compare-and-swap operation. Added a thread-priority tweak to WASAPI. Removed MS-specific classes from the web browser component.
This commit is contained in:
parent
c86c7a8011
commit
35a4b5085f
18 changed files with 559 additions and 640 deletions
|
|
@ -780,8 +780,26 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void setMMThreadPriority()
|
||||
{
|
||||
DynamicLibraryLoader dll ("avrt.dll");
|
||||
DynamicLibraryImport (AvSetMmThreadCharacteristics, avSetMmThreadCharacteristics, HANDLE, dll, (LPCTSTR, LPDWORD))
|
||||
DynamicLibraryImport (AvSetMmThreadPriority, avSetMmThreadPriority, HANDLE, dll, (HANDLE, AVRT_PRIORITY))
|
||||
|
||||
if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0)
|
||||
{
|
||||
DWORD dummy = 0;
|
||||
HANDLE h = avSetMmThreadCharacteristics (_T("Pro Audio"), &dummy);
|
||||
|
||||
if (h != 0)
|
||||
avSetMmThreadPriority (h, AVRT_PRIORITY_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
setMMThreadPriority();
|
||||
|
||||
const int bufferSize = currentBufferSizeSamples;
|
||||
|
||||
HANDLE events[2];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue