#define DEVICE_TEXT N_("Output device")
#define DEVICE_LONGTEXT N_("Portaudio identifier for the output device")
#define DEVICE_TEXT N_("Output device")
#define DEVICE_LONGTEXT N_("Portaudio identifier for the output device")
-vlc_module_begin();
- set_shortname( "PortAudio" );
- set_description( N_("PORTAUDIO audio output") );
- set_category( CAT_AUDIO );
- set_subcategory( SUBCAT_AUDIO_AOUT );
+vlc_module_begin ()
+ set_shortname( "PortAudio" )
+ set_description( N_("PORTAUDIO audio output") )
+ set_category( CAT_AUDIO )
+ set_subcategory( SUBCAT_AUDIO_AOUT )
add_integer( "portaudio-audio-device", 0, NULL,
add_integer( "portaudio-audio-device", 0, NULL,
- DEVICE_TEXT, DEVICE_LONGTEXT, false );
- add_deprecated_alias( "portaudio-device" ); /* deprecated since 0.9.3 */
- set_capability( "audio output", 0 );
- set_callbacks( Open, Close );
-vlc_module_end();
+ DEVICE_TEXT, DEVICE_LONGTEXT, false )
+ add_deprecated_alias( "portaudio-device" ) /* deprecated since 0.9.3 */
+ set_capability( "audio output", 0 )
+ set_callbacks( Open, Close )
+vlc_module_end ()
/* This routine will be called by the PortAudio engine when audio is needed.
* It may called at interrupt level on some machines so don't do anything
/* This routine will be called by the PortAudio engine when audio is needed.
* It may called at interrupt level on some machines so don't do anything
const PaStreamCallbackTimeInfo *paDate,
PaStreamCallbackFlags statusFlags, void *p_cookie )
{
const PaStreamCallbackTimeInfo *paDate,
PaStreamCallbackFlags statusFlags, void *p_cookie )
{
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
msg_Dbg( p_aout, "entering Open()");
/* Allocate p_sys structure */
msg_Dbg( p_aout, "entering Open()");
/* Allocate p_sys structure */
- var_Create( p_aout, "portaudio-audio-device", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT);
- var_Get( p_aout, "portaudio-audio-device", &val );
- p_sys->i_device_id = val.i_int;
+ p_sys->i_device_id = var_CreateGetInteger( p_aout, "portaudio-audio-device" );
/* Create PORTAUDIOThread */
if( vlc_thread_create( pa_thread, "aout", PORTAUDIOThread,
/* Create PORTAUDIOThread */
if( vlc_thread_create( pa_thread, "aout", PORTAUDIOThread,
if( i_err != paNoError )
{
msg_Err( p_aout, "Pa_StopStream: %d (%s)", i_err,
if( i_err != paNoError )
{
msg_Err( p_aout, "Pa_StopStream: %d (%s)", i_err,
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 1 channel" );
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 1 channel" );
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT,
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT,
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 4 channels" );
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 4 channels" );
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 5 channels" );
var_Change( p_aout, "audio-device",
VLC_VAR_ADDCHOICE, &val, &text );
msg_Dbg( p_aout, "device supports 5 channels" );
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 5.1 channels" );
}
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 5.1 channels" );
}
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
*****************************************************************************/
static void Play( aout_instance_t * p_aout )
{
*****************************************************************************/
static void Play( aout_instance_t * p_aout )
{