*****************************************************************************/
#define MODULE_NAME alsa
+#include "modules_inner.h"
/*****************************************************************************
* Preamble
#include "common.h" /* boolean_t, byte_t */
#include "threads.h"
#include "mtime.h"
+#include "tests.h"
#include "audio_output.h" /* aout_thread_t */
#include "main.h"
#include "modules.h"
-#include "modules_inner.h"
-
-
typedef struct alsa_device_s
{
byte_t *buffer, int i_size );
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;
p_function_list->functions.aout.pf_play = aout_Play;
p_function_list->functions.aout.pf_close = aout_Close;
}
-
/*****************************************************************************
* aout_Probe: probes the audio device and return a score
return ( 0 );
}
- /* Otherwise, we may think it'll work */
-
- /* Close */
+ /* Close it */
i_close_return = snd_pcm_close ( local_sys.p_alsa_handle );
if( i_close_return )
intf_ErrMsg( "Error closing alsa device in aout_probe; exit=%i",
i_close_return );
intf_ErrMsg( "This means : %s",snd_strerror( i_close_return ) );
+ return( 0 );
}
+ if( TestMethod( AOUT_METHOD_VAR, "alsa" ) )
+ {
+ return( 999 );
+ }
+
/* And return score */
- return( 100 );
+ return( 50 );
}
/*****************************************************************************