diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 10 | ||||
-rw-r--r-- | Alc/alsa.c | 6 | ||||
-rw-r--r-- | Alc/dsound.c | 2 | ||||
-rw-r--r-- | Alc/oss.c | 4 | ||||
-rw-r--r-- | Alc/solaris.c | 2 |
5 files changed, 12 insertions, 12 deletions
@@ -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"); @@ -358,7 +358,7 @@ static ALuint ALSAProc(ALvoid *ptr) char *WritePtr; int err; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); while(!data->killNow) { @@ -432,7 +432,7 @@ static ALuint ALSANoMMapProc(ALvoid *ptr) snd_pcm_sframes_t avail; char *WritePtr; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); while(!data->killNow) { @@ -488,7 +488,7 @@ static ALuint ALSANoMMapCaptureProc(ALvoid *ptr) alsa_data *data = (alsa_data*)pDevice->ExtraData; snd_pcm_sframes_t avail; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); while(!data->killNow) { diff --git a/Alc/dsound.c b/Alc/dsound.c index 7894585d..29e5b1cd 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -163,7 +163,7 @@ static ALuint DSoundProc(ALvoid *ptr) DWORD avail; HRESULT err; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); memset(&DSBCaps, 0, sizeof(DSBCaps)); DSBCaps.dwSize = sizeof(DSBCaps); @@ -82,7 +82,7 @@ static ALuint OSSProc(ALvoid *ptr) ALint frameSize; ssize_t wrote; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); frameSize = aluChannelsFromFormat(pDevice->Format) * aluBytesFromFormat(pDevice->Format); @@ -124,7 +124,7 @@ static ALuint OSSCaptureProc(ALvoid *ptr) int frameSize; int amt; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); frameSize = aluBytesFromFormat(pDevice->Format); frameSize *= aluChannelsFromFormat(pDevice->Format); diff --git a/Alc/solaris.c b/Alc/solaris.c index e60ac976..08ebdb4c 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -57,7 +57,7 @@ static ALuint SolarisProc(ALvoid *ptr) ALint frameSize; int wrote; - EnableRTPrio(RTPrioLevel); + SetRTPriority(); frameSize = aluChannelsFromFormat(pDevice->Format) * aluBytesFromFormat(pDevice->Format); |