diff options
author | Chris Robinson <[email protected]> | 2009-12-01 23:15:09 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-01 23:15:09 -0800 |
commit | 6cfc31777b7cca6714cf926fbc6e491c00a3f836 (patch) | |
tree | e535e539c85a82d29fc0956ee477aae2e25bc85e /OpenAL32 | |
parent | 0e1e8503e0f6fb73d06ba0dff6e5b2771b1df856 (diff) |
Add an option for real-time priority mixing
Default to disable for now, as a safety precaution
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 0820b9dc..69bd9d5b 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -181,22 +181,6 @@ static __inline ALuint NextPowerOf2(ALuint value) return powerOf2; } -static __inline void EnableRTPrio() -{ -#ifdef _WIN32 - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); -#elif defined(HAVE_PTHREAD_SETSCHEDPARAM) - struct sched_param param; - - /* Use the minimum real-time priority possible for now (on Linux this - * should be 1 for SCHED_RR) */ - param.sched_priority = sched_get_priority_min(SCHED_RR); - pthread_setschedparam(pthread_self(), SCHED_RR, ¶m); -#else - /* Real-time priority not available */ -#endif -} - typedef struct { ALCboolean (*OpenPlayback)(ALCdevice*, const ALCchar*); @@ -343,6 +327,8 @@ struct ALCcontext_struct ALCcontext *next; }; +extern ALint RTPrioLevel; + ALCvoid ReleaseALC(ALCvoid); void AppendDeviceList(const ALCchar *name); @@ -373,6 +359,8 @@ int GetConfigValueInt(const char *blockName, const char *keyName, int def); float GetConfigValueFloat(const char *blockName, const char *keyName, float def); int GetConfigValueBool(const char *blockName, const char *keyName, float def); +void EnableRTPrio(ALint level); + ALCboolean ALCAPIENTRY alcMakeCurrent(ALCcontext *context); ALCcontext* ALCAPIENTRY alcGetThreadContext(void); |