/*****************************************************************************
* Module descriptor
*****************************************************************************/
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-static const char *ppsz_devices[] = { "default" };
-static const char *ppsz_devices_text[] = { N_("Default") };
+static const char *const ppsz_devices[] = { "default" };
+static const char *const ppsz_devices_text[] = { N_("Default") };
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_string( "alsadev", DEFAULT_ALSA_DEVICE, aout_FindAndRestart,
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_string( "alsadev", DEFAULT_ALSA_DEVICE, aout_FindAndRestart,
change_string_list( ppsz_devices, ppsz_devices_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
change_string_list( ppsz_devices, ppsz_devices_text, FindDevicesCallback );
change_action_add( FindDevicesCallback, N_("Refresh list") );
/* Add final settings to the variable */
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
/* Add final settings to the variable */
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
/* Get device name */
if( (psz_device = config_GetPsz( p_aout, "alsadev" )) == NULL )
{
msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" );
/* Get device name */
if( (psz_device = config_GetPsz( p_aout, "alsadev" )) == NULL )
{
msg_Err( p_aout, "no audio device given (maybe \"default\" ?)" );
- intf_UserFatal( p_aout, VLC_FALSE, _("No Audio Device"),
+ intf_UserFatal( p_aout, false, _("No Audio Device"),
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_iec_device, snd_strerror( i_snd_rc ) );
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_iec_device, snd_strerror( i_snd_rc ) );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_iec_device, snd_strerror( i_snd_rc ) );
free( p_sys );
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_iec_device, snd_strerror( i_snd_rc ) );
free( p_sys );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_device, snd_strerror( i_snd_rc ) );
{
msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
psz_device, snd_strerror( i_snd_rc ) );
- intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ intf_UserFatal( p_aout, false, _("Audio output failed"),
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_device, snd_strerror( i_snd_rc ) );
free( p_sys );
_("VLC could not open the ALSA device \"%s\" (%s)."),
psz_device, snd_strerror( i_snd_rc ) );
free( p_sys );
/* Get Initial hardware parameters */
if ( ( i_snd_rc = snd_pcm_hw_params_any( p_sys->p_snd_pcm, p_hw ) ) < 0 )
/* Get Initial hardware parameters */
if ( ( i_snd_rc = snd_pcm_hw_params_any( p_sys->p_snd_pcm, p_hw ) ) < 0 )
/* Commit hardware parameters. */
if ( ( i_snd_rc = snd_pcm_hw_params( p_sys->p_snd_pcm, p_hw ) ) < 0 )
{
/* Commit hardware parameters. */
if ( ( i_snd_rc = snd_pcm_hw_params( p_sys->p_snd_pcm, p_hw ) ) < 0 )
{
i_snd_pcm_format = SND_PCM_FORMAT_S16;
p_aout->output.output.i_format = AOUT_FMT_S16_NE;
msg_Warn( p_aout, "unable to commit hardware configuration "
i_snd_pcm_format = SND_PCM_FORMAT_S16;
p_aout->output.output.i_format = AOUT_FMT_S16_NE;
msg_Warn( p_aout, "unable to commit hardware configuration "
/* Create ALSA thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", ALSAThread,
/* Create ALSA thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", ALSAThread,
vlc_cond_wait( &p_sys->wait, &p_sys->lock );
vlc_mutex_unlock( &p_sys->lock );
vlc_cond_wait( &p_sys->wait, &p_sys->lock );
vlc_mutex_unlock( &p_sys->lock );
int i_bytes = snd_pcm_frames_to_bytes( p_sys->p_snd_pcm, delay );
next_date = mdate() + ( (mtime_t)i_bytes * 1000000
/ p_aout->output.output.i_bytes_per_frame
int i_bytes = snd_pcm_frames_to_bytes( p_sys->p_snd_pcm, delay );
next_date = mdate() + ( (mtime_t)i_bytes * 1000000
/ p_aout->output.output.i_bytes_per_frame
* (stream is suspended and waiting for an application recovery) */
msg_Dbg( p_aout, "entering in suspend mode, trying to resume..." );
* (stream is suspended and waiting for an application recovery) */
msg_Dbg( p_aout, "entering in suspend mode, trying to resume..." );