]> git.sesse.net Git - vlc/blobdiff - plugins/dummy/aout_dummy.c
* Fixed the BeOS compile typo.
[vlc] / plugins / dummy / aout_dummy.c
index 666ebc1ebe9e1e1f401e041d9044a524098d18a4..6e4a6f8e32a56b26a91bf6d840e583a5ba537afa 100644 (file)
@@ -1,9 +1,10 @@
 /*****************************************************************************
  * aout_dummy.c : dummy audio output plugin
  *****************************************************************************
- * Copyright (C) 2000 VideoLAN
+ * Copyright (C) 2000, 2001 VideoLAN
+ * $Id: aout_dummy.c,v 1.11 2001/05/30 17:03:12 sam Exp $
  *
- * Authors:
+ * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define MODULE_NAME dummy
+#include "modules_inner.h"
+
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
+#include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
 #include "main.h"
 
 #include "modules.h"
+#include "modules_export.h"
 
 /*****************************************************************************
  * vout_dummy_t: dummy video output method descriptor
@@ -63,7 +68,7 @@ static void    aout_Close       ( aout_thread_t *p_aout );
  * Functions exported as capabilities. They are declared as static so that
  * we don't pollute the namespace too much.
  *****************************************************************************/
-void aout_getfunctions( function_list_t * p_function_list )
+void _M( aout_getfunctions )( function_list_t * p_function_list )
 {
     p_function_list->pf_probe = aout_Probe;
     p_function_list->functions.aout.pf_open = aout_Open;
@@ -78,6 +83,11 @@ void aout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
+    if( TestMethod( AOUT_METHOD_VAR, "dummy" ) )
+    {
+        return( 999 );
+    }
+
     /* The dummy plugin always works but give it the lower possible score */
     return( 1 );
 }
@@ -89,8 +99,10 @@ static int aout_Open( aout_thread_t *p_aout )
 {
     /* Initialize some variables */
     p_aout->i_format = AOUT_FORMAT_DEFAULT;
-    p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
-    p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
+    p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
+                                                  AOUT_STEREO_DEFAULT );
+    p_aout->l_rate     =     main_GetIntVariable( AOUT_RATE_VAR,
+                                                  AOUT_RATE_DEFAULT );
 
     return( 0 );
 }