diff --git a/modules/audio_filter/resampler/coreaudio.c b/modules/audio_filter/resampler/coreaudio.c
index 575228cac0ff6ed0f4eb9684c2238e651ae913c3..a3a4146075c6ab400e2f652e7cf8645c8f162aa6 100644
--- a/modules/audio_filter/resampler/coreaudio.c
+++ b/modules/audio_filter/resampler/coreaudio.c
@@ -2,7 +2,7 @@
  * coreaudio.c resampler based on CoreAudio's AudioConverter
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: coreaudio.c,v 1.2 2003/03/31 22:39:27 massiot Exp $
+ * $Id: coreaudio.c,v 1.3 2003/05/04 15:02:42 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -62,7 +62,7 @@ struct aout_filter_sys_t
  *****************************************************************************/
 vlc_module_begin();
     set_description( _("audio filter using CoreAudio for resampling") );
-    set_capability( "audio filter", 0 );
+    set_capability( "audio filter", 40 );
     set_callbacks( Create, Close );
 vlc_module_end();
 
diff --git a/modules/audio_output/coreaudio.c b/modules/audio_output/coreaudio.c
index 53c85c152dc418b84d1c0510bfc7496a527991e8..8a79d001ad6b9d481e8371d560f3bf7dbbd44a41 100644
--- a/modules/audio_output/coreaudio.c
+++ b/modules/audio_output/coreaudio.c
@@ -2,7 +2,7 @@
  * coreaudio.c: CoreAudio output plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: coreaudio.c,v 1.1 2003/03/30 23:35:06 jlj Exp $
+ * $Id: coreaudio.c,v 1.2 2003/05/04 15:02:42 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -337,6 +337,26 @@ static int Open( vlc_object_t * p_this )
 
         msg_Dbg( p_aout, "device buffer size set to: [%ld]", 
                  p_sys->i_buffer_size );
+
+        /* Set buffer frame size */
+        i_param_size = sizeof( p_aout->output.i_nb_samples );
+        err = AudioDeviceSetProperty( p_sys->devid, 0, 0, FALSE,
+                                      kAudioDevicePropertyBufferFrameSize,
+                                      i_param_size,
+                                      &p_aout->output.i_nb_samples );
+        if( err != noErr )
+        {
+            msg_Err( p_aout, "failed to set buffer frame size: [%4.4s]", 
+                     (char *)&err );
+            FreeDevice( p_aout );
+            FreeHardwareInfo( p_aout );
+            vlc_mutex_destroy( &p_sys->lock );
+            free( (void *)p_sys );
+            return( VLC_EGENERIC );
+        }
+
+        msg_Dbg( p_aout, "device buffer frame size set to: [%d]",
+                 p_aout->output.i_nb_samples );
     }
 
     switch( p_sys->stream_format.mFormatID )
@@ -412,26 +432,6 @@ static int Open( vlc_object_t * p_this )
         return( VLC_EGENERIC );
     }
 
-    /* Set buffer frame size */
-    i_param_size = sizeof( p_aout->output.i_nb_samples );
-    err = AudioDeviceSetProperty( p_sys->devid, 0, 0, FALSE,
-                                  kAudioDevicePropertyBufferFrameSize,
-                                  i_param_size,
-                                  &p_aout->output.i_nb_samples );
-    if( err != noErr )
-    {
-        msg_Err( p_aout, "failed to set buffer frame size: [%4.4s]", 
-                 (char *)&err );
-        FreeDevice( p_aout );
-        FreeHardwareInfo( p_aout );
-        vlc_mutex_destroy( &p_sys->lock );
-        free( (void *)p_sys );
-        return( VLC_EGENERIC );
-    }
-
-    msg_Dbg( p_aout, "device buffer frame size set to: [%d]",
-             p_aout->output.i_nb_samples );
-
     /* Add callback */
     err = AudioDeviceAddIOProc( p_sys->devid,
                                 (AudioDeviceIOProc)IOCallback,