Commit 61b87efd authored by Christophe Massiot's avatar Christophe Massiot

Do not forget to register aout_ChannelsRestart as the callback for

audio-device, plus miscellaneous changes.
parent 930c3c31
......@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: alsa.c,v 1.18 2003/01/08 10:50:58 massiot Exp $
* $Id: alsa.c,v 1.19 2003/01/13 14:51:25 massiot Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
......@@ -207,6 +207,8 @@ static void Probe( aout_instance_t * p_aout,
/* Add final settings to the variable */
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.43 2003/01/07 15:12:15 massiot Exp $
* $Id: oss.c,v 1.44 2003/01/13 14:51:25 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -214,8 +214,9 @@ static void Probe( aout_instance_t * p_aout )
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val );
}
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart,
NULL );
}
/*****************************************************************************
......@@ -311,6 +312,9 @@ static int Open( vlc_object_t *p_this )
}
free( val.psz_string );
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
/* Reset the DSP device */
if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
{
......
......@@ -2,7 +2,7 @@
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.18 2002/12/10 18:22:01 gbazin Exp $
* $Id: sdl.c,v 1.19 2003/01/13 14:51:25 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -199,14 +199,13 @@ static int Open ( vlc_object_t *p_this )
val.psz_string = N_("Mono");
}
var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT, &val );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart,
NULL );
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
}
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
p_aout->output.output.i_rate = obtained.freq;
p_aout->output.i_nb_samples = obtained.samples;
p_aout->output.pf_play = Play;
......
......@@ -2,7 +2,7 @@
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout.m,v 1.18 2003/01/02 22:49:19 jlj Exp $
* $Id: aout.m,v 1.19 2003/01/13 14:51:25 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -176,6 +176,7 @@ int E_(OpenAudio)( vlc_object_t * p_this )
UInt32 i, i_param_size;
struct aout_sys_t * p_sys;
aout_instance_t * p_aout = (aout_instance_t *)p_this;
vlc_value_t val;
/* Allocate structure */
p_sys = (struct aout_sys_t *)malloc( sizeof( struct aout_sys_t ) );
......@@ -197,8 +198,6 @@ int E_(OpenAudio)( vlc_object_t * p_this )
if( var_Type( p_aout, "audio-device" ) == 0 )
{
vlc_value_t val;
var_Create( p_aout, "audio-device", VLC_VAR_STRING |
VLC_VAR_HASCHOICE );
......@@ -208,9 +207,11 @@ int E_(OpenAudio)( vlc_object_t * p_this )
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val );
}
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart,
NULL );
}
val.b_bool = VLC_TRUE;
var_Set( p_aout, "intf-change", val );
/* Get selected device */
if( GetDevice( p_aout, &p_sys->devid ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment