summaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-12 07:27:12 -0700
committerChris Robinson <[email protected]>2010-05-12 07:27:12 -0700
commita53e3dda75f329f6f2060e8e760a1a4f7edbe45a (patch)
tree38104808dcb3033975a7cb55e95ab77e974cb7aa /Alc/ALc.c
parent2220c22c907026d8f4229ebf8b9eb75fb29810c9 (diff)
Don't needlessly expose a variable for the backends
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 5560e6e7..ca84476e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -360,7 +360,7 @@ static const ALchar alExtList[] =
"AL_LOKI_quadriphonic";
// Mixing Priority Level
-ALint RTPrioLevel;
+static ALint RTPrioLevel;
// Resampler Quality
resampler_t DefaultResampler;
@@ -604,19 +604,19 @@ void al_print(const char *fname, unsigned int line, const char *fmt, ...)
fprintf(stderr, "%s", str);
}
-void EnableRTPrio(ALint level)
+void SetRTPriority(void)
{
ALboolean failed;
#ifdef _WIN32
- if(level > 0)
+ if(RTPrioLevel > 0)
failed = !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
else
failed = !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
#elif defined(HAVE_PTHREAD_SETSCHEDPARAM)
struct sched_param param;
- if(level > 0)
+ if(RTPrioLevel > 0)
{
/* Use the minimum real-time priority possible for now (on Linux this
* should be 1 for SCHED_RR) */
@@ -630,7 +630,7 @@ void EnableRTPrio(ALint level)
}
#else
/* Real-time priority not available */
- failed = !!level;
+ failed = (RTPrioLevel>0);
#endif
if(failed)
AL_PRINT("Failed to set priority level for thread\n");