#include <vlc/vlc.h>
#include <vlc/aout.h>
+#include <vlc_interaction.h>
#include "aout_internal.h"
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"),
+ _("No audio device name was given. You might want to " \
+ "enter \"default\".") );
free( p_sys );
return VLC_EGENERIC;
}
{
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"),
+ _("VLC could not open the ALSA device \"%s\" (%s)."),
+ psz_iec_device, snd_strerror( i_snd_rc ) );
free( p_sys );
free( psz_device );
return VLC_EGENERIC;
SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) ) == -EBUSY )
{
if( i ) msleep( 100000 /* 100ms */ );
- else msg_Err( p_aout, "audio device: %s is already in use",
+ else
+ {
+ msg_Err( p_aout, "audio device: %s is already in use",
psz_device );
+ intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"),
+ _("The audio device \"%s\" is already in use."),
+ psz_device );
+ }
continue;
}
break;
{
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"),
+ _("VLC could not open the ALSA device \"%s\" (%s)."),
+ psz_device, snd_strerror( i_snd_rc ) );
free( p_sys );
free( psz_device );
return VLC_EGENERIC;
static void ALSAFill( aout_instance_t * p_aout )
{
struct aout_sys_t * p_sys = p_aout->output.p_sys;
-
aout_buffer_t * p_buffer;
snd_pcm_status_t * p_status = p_sys->p_status;
- snd_timestamp_t ts_next;
int i_snd_rc;
mtime_t next_date;
/* With screwed ALSA drivers the timestamp is always zero;
* use another method then */
snd_pcm_sframes_t delay = 0;
- ssize_t i_bytes = 0;
snd_pcm_delay( p_sys->p_snd_pcm, &delay );
next_date = mdate() + (mtime_t)(delay) * 1000000 /