]> git.sesse.net Git - vlc/blobdiff - plugins/alsa/alsa.c
* Ported Glide and MGA plugins to the new module API. MGA never worked,
[vlc] / plugins / alsa / alsa.c
index 80734da46bd38f461b922ffd7384766830e0c138..aa4d58a237a3702c8b62b09d7c296e40a0a9d7bc 100644 (file)
@@ -22,6 +22,7 @@
  *****************************************************************************/
 
 #define MODULE_NAME alsa
+#include "modules_inner.h"
 
 /*****************************************************************************
  * Preamble
@@ -46,7 +47,6 @@
 #include "main.h"
 
 #include "modules.h"
-#include "modules_inner.h"
 
 /*****************************************************************************
  * Build configuration tree.
@@ -58,7 +58,7 @@ MODULE_CONFIG_END
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
-extern void aout_getfunctions( function_list_t * p_function_list );
+void _M( aout_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
  * InitModule: get the module structure and configuration.
@@ -68,7 +68,7 @@ extern void aout_getfunctions( function_list_t * p_function_list );
  * be unloaded later to save memory, and we want to be able to access this
  * data even after the module has been unloaded.
  *****************************************************************************/
-int InitModule( module_t * p_module )
+MODULE_INIT
 {
     p_module->psz_name = MODULE_STRING;
     p_module->psz_longname = "Alsa audio module";
@@ -87,7 +87,7 @@ int InitModule( module_t * p_module )
  * be set to 0 and calls to NeedModule() be made to increment it. To unload
  * the module, one has to wait until i_usage == 0 and call DeactivateModule().
  *****************************************************************************/
-int ActivateModule( module_t * p_module )
+MODULE_ACTIVATE
 {
     p_module->p_functions = malloc( sizeof( module_functions_t ) );
     if( p_module->p_functions == NULL )
@@ -95,7 +95,7 @@ int ActivateModule( module_t * p_module )
         return( -1 );
     }
 
-    aout_getfunctions( &p_module->p_functions->aout );
+    _M( aout_getfunctions )( &p_module->p_functions->aout );
     
     p_module->p_config = p_config;
     
@@ -110,9 +110,10 @@ int ActivateModule( module_t * p_module )
  * returns, i_usage can be set to -1 and the module unloaded. Be careful to
  * lock usage_lock during the whole process.
  *****************************************************************************/
-int DeactivateModule( module_t * p_module )
+MODULE_DEACTIVATE
 {
-        free( p_module->p_functions );
+    free( p_module->p_functions );
 
-            return( 0 );
+    return( 0 );
 }
+