diff -ru xmms-1.2.10/General/ir/ir.c xmms-1.2.10-patched/General/ir/ir.c --- xmms-1.2.10/General/ir/ir.c 2001-03-05 14:17:44.000000000 +0100 +++ xmms-1.2.10-patched/General/ir/ir.c 2006-03-26 12:15:53.000000000 +0200 @@ -16,10 +16,10 @@ #include "ir.h" /* Important stuff to know */ -static gboolean keepGoing = FALSE; +gboolean keepGoing = FALSE; /* The thread handle */ -static pthread_t irapp_thread; +pthread_t irapp_thread; /* Declarations for calls that we need to mention in the plugin struct */ static void init(void); diff -ru xmms-1.2.10/configure xmms-1.2.10-patched/configure --- xmms-1.2.10/configure 2004-02-23 22:44:32.000000000 +0100 +++ xmms-1.2.10-patched/configure 2006-03-26 12:15:42.000000000 +0200 @@ -19099,7 +19099,7 @@ i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*) arch_type=ix86 case "$host" in - *-*-netbsd* | *-*openbsd*) + *-*-netbsd* | *-*openbsd* | *-*-darwin*) ;; *) ARCH_DEFINES="-DI386_ASSEM" diff -ru xmms-1.2.10/libxmms/util.c xmms-1.2.10-patched/libxmms/util.c --- xmms-1.2.10/libxmms/util.c 2003-05-19 23:22:07.000000000 +0200 +++ xmms-1.2.10-patched/libxmms/util.c 2006-03-26 12:14:47.000000000 +0200 @@ -15,6 +15,13 @@ #include #endif +#if defined (__APPLE__) +#include +#include +#include +#include +#endif + #if TIME_WITH_SYS_TIME # include # include @@ -73,6 +80,35 @@ gboolean xmms_check_realtime_priority(void) { +#if defined (__APPLE__) + mach_port_t machThread = mach_thread_self(); + kern_return_t result = 0; + thread_extended_policy_data_t timeShareData; + thread_precedence_policy_data_t precidenceData; + + //Copied from http://lists.apple.com/archives/scitech/2003/Jan/msg00119.html. We put priority to 20 and, this is the important part, + //set this thread not to timeshare, but to a round robin priority. + precidenceData.importance = 20; + timeShareData.timeshare = FALSE; + + //Set the scheduling flavor. We want to do this first, since doing so + //can alter the priority + result = thread_policy_set( machThread, + THREAD_EXTENDED_POLICY, + &timeShareData, + THREAD_EXTENDED_POLICY_COUNT ); + + if( 0 != result ) + return result; + + //Now set the priority + return thread_policy_set( machThread, + THREAD_PRECEDENCE_POLICY, + &precidenceData, + THREAD_PRECEDENCE_POLICY_COUNT ); + + return TRUE; +#endif #ifdef HAVE_SCHED_SETSCHEDULER #ifdef __FreeBSD__ /* diff -ru xmms-1.2.10/ltmain.sh xmms-1.2.10-patched/ltmain.sh --- xmms-1.2.10/ltmain.sh 2003-09-04 22:59:05.000000000 +0200 +++ xmms-1.2.10-patched/ltmain.sh 2006-03-26 12:14:47.000000000 +0200 @@ -4053,10 +4053,10 @@ # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test $need_relink = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi +# if test "$installed" = no && test $need_relink = yes; then +# $echo >> $output "\ +#relink_command=\"$relink_command\"" +# fi done fi