]> git.sesse.net Git - vlc/blobdiff - plugins/macosx/aout_macosx.m
Mac OS X-specific :
[vlc] / plugins / macosx / aout_macosx.m
index 9e3ef1610c67b22feb488ad7202001ceff82caa8..1ff2e8360bc76aa50c599502ba2c55468b9f3085 100644 (file)
@@ -2,7 +2,7 @@
  * aout_macosx.c : CoreAudio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.m,v 1.2 2002/05/19 00:34:54 massiot Exp $
+ * $Id: aout_macosx.m,v 1.3 2002/05/19 23:51:37 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -106,12 +106,6 @@ static int aout_Open( aout_thread_t *p_aout )
     OSStatus err;
     UInt32 ui_param_size;
 
-    struct thread_time_constraint_policy ttcpolicy;
-    int mib[2];
-    unsigned int miblen;
-    int i_busspeed;
-    size_t len;
-
     /* allocate instance */
     p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
     if( p_aout->p_sys == NULL )
@@ -182,40 +176,6 @@ static int aout_Open( aout_thread_t *p_aout )
         return( -1 );
     }
 
-    /* Go to time-constrained thread policy */
-
-    /* Get bus speed */
-    mib[0] = CTL_HW;
-    mib[1] = HW_BUS_FREQ;
-    miblen = 2;
-    len = 4;
-    if( sysctl(mib, miblen, &i_busspeed, &len, NULL, 0) == -1 )
-    {
-        intf_ErrMsg("vout error: couldn't go to time-constrained policy (bus speed)");
-    }
-    else
-    {
-        /* This is in AbsoluteTime units, which are equal to
-         * 1/4 the bus speed on most machines. */
-        /* FIXME : these are random numbers ! */
-        /* hard-coded numbers are approximations for 100 MHz bus speed.
-         * assume that app deals in frame-sized chunks, e.g. 30 per second.
-         * ttcpolicy.period = 833333; */
-        ttcpolicy.period = i_busspeed / 120;
-        /* ttcpolicy.computation = 60000; */
-        ttcpolicy.computation = i_busspeed / 1440;
-        /* ttcpolicy.constraint = 120000; */
-        ttcpolicy.constraint = i_busspeed / 720;
-        ttcpolicy.preemptible = 1;
-
-        if (thread_policy_set(mach_thread_self(),
-                  THREAD_TIME_CONSTRAINT_POLICY, (int *)&ttcpolicy,
-                  THREAD_TIME_CONSTRAINT_POLICY_COUNT) != KERN_SUCCESS)
-        {
-            intf_ErrMsg("vout error: couldn't go to time-constrained policy (thread_policy_set)");
-        }
-    }
-
     return( 0 );
 }