increase decoder thread priority by 32 instead of 5; log errors
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "archutils/Unix/CrashHandler.h"
|
||||
#include <mach/thread_act.h>
|
||||
#include <mach/mach_init.h>
|
||||
#include <mach/mach_error.h>
|
||||
|
||||
static AudioConverter *gConverter;
|
||||
|
||||
@@ -192,8 +193,10 @@ void RageSound_CA::SetupDecodingThread()
|
||||
{
|
||||
/* Increase the scheduling precedence of the decoder thread. */
|
||||
thread_precedence_policy po;
|
||||
po.importance = 5;
|
||||
thread_policy_set( mach_thread_self(), THREAD_PRECEDENCE_POLICY,
|
||||
po.importance = 32;
|
||||
kern_return_t ret = thread_policy_set( mach_thread_self(), THREAD_PRECEDENCE_POLICY,
|
||||
(int *)&po, THREAD_PRECEDENCE_POLICY_COUNT );
|
||||
if( ret != KERN_SUCCESS )
|
||||
LOG->Warn( "thread_policy_set(THREAD_PRECEDENCE_POLICY) failed: %s", mach_error_string(ret) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user