if( p_intf->p_sys->i_socket == -1 )
{
vprintf( psz_fmt, args );
- printf( "\n" );
+ printf( "\r\n" );
}
else
{
/* status callbacks */
/* Listen to audio volume updates */
- var_AddCallback( p_intf->p_vlc, "volume", VolumeChanged, p_intf );
+ var_AddCallback( p_intf->p_vlc, "volume-change", VolumeChanged, p_intf );
#ifdef WIN32
/* Get the file descriptor of the console input */
p_playlist = NULL;
}
- var_DelCallback( p_intf->p_vlc, "volume", VolumeChanged, p_intf );
+ var_DelCallback( p_intf->p_vlc, "volume-change", VolumeChanged, p_intf );
}
static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
intf_thread_t *p_intf = (intf_thread_t*)p_data;
vlc_mutex_lock( &p_intf->p_sys->status_lock );
- msg_rc( STATUS_CHANGE "( audio volume: %d )", newval.i_int );
+ msg_rc( STATUS_CHANGE "( audio volume: %d )", config_GetInt( p_this, "volume") );
vlc_mutex_unlock( &p_intf->p_sys->status_lock );
return VLC_SUCCESS;
}
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
input_thread_t *p_input = NULL;
- int i_error;
+ int i_error = VLC_EGENERIC;
p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( !p_input )
int __aout_VolumeSet( vlc_object_t * p_object, audio_volume_t i_volume )
{
vlc_value_t val;
- aout_instance_t * p_aout = vlc_object_find( p_object, VLC_OBJECT_AOUT,
- FIND_ANYWHERE );
+ aout_instance_t *p_aout = vlc_object_find( p_object, VLC_OBJECT_AOUT, FIND_ANYWHERE );
int i_result = 0;
config_PutInt( p_object, "volume", i_volume );
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
+ var_Set( p_aout->p_vlc, "volume-change", val );
vlc_object_release( p_aout );
return i_result;
}
var_Create( p_vlc, "drawableportx", VLC_VAR_INTEGER );
var_Create( p_vlc, "drawableporty", VLC_VAR_INTEGER );
+ /* Create volume callback system. */
+ var_Create( p_vlc, "volume-change", VLC_VAR_BOOL );
+
/*
* Get input filenames given as commandline arguments
*/