Browse Source

Remove aout_FindAndRestart()

This was only used to change the OSS or ALSA device on the fly.
However, this really should be done with a variable callback, not from
the configuration.
pull/2/head
Rémi Denis-Courmont 16 years ago
parent
commit
4d63bf16fd
  1. 1
      include/vlc_aout.h
  2. 2
      modules/audio_output/alsa.c
  3. 2
      modules/audio_output/oss.c
  4. 24
      src/audio_output/intf.c
  5. 1
      src/libvlccore.sym

1
include/vlc_aout.h

@ -324,7 +324,6 @@ VLC_EXPORT( int, aout_ToggleMute, ( vlc_object_t *, audio_volume_t * ) );
#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
VLC_EXPORT( int, aout_SetMute, ( vlc_object_t *, audio_volume_t *, bool ) );
VLC_EXPORT( bool, aout_IsMuted, ( vlc_object_t * ) );
VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, bool ));

2
modules/audio_output/alsa.c

@ -110,7 +110,7 @@ vlc_module_begin ()
set_description( N_("ALSA audio output") )
set_category( CAT_AUDIO )
set_subcategory( SUBCAT_AUDIO_AOUT )
add_string( "alsa-audio-device", DEFAULT_ALSA_DEVICE, aout_FindAndRestart,
add_string( "alsa-audio-device", DEFAULT_ALSA_DEVICE, NULL,
N_("ALSA Device Name"), NULL, false )
add_deprecated_alias( "alsadev" ) /* deprecated since 0.9.3 */
change_string_list( ppsz_devices, ppsz_devices_text, FindDevicesCallback )

2
modules/audio_output/oss.c

@ -106,7 +106,7 @@ vlc_module_begin ()
set_category( CAT_AUDIO )
set_subcategory( SUBCAT_AUDIO_AOUT )
add_loadfile( "oss-audio-device", "/dev/dsp", aout_FindAndRestart,
add_loadfile( "oss-audio-device", "/dev/dsp", NULL,
N_("OSS DSP device"), NULL, false )
add_deprecated_alias( "dspdev" ) /* deprecated since 0.9.3 */
add_bool( "oss-buggy", false, NULL, BUGGY_TEXT, BUGGY_LONGTEXT, true )

24
src/audio_output/intf.c

@ -457,30 +457,6 @@ static int aout_Restart( aout_instance_t * p_aout )
return b_error;
}
/*****************************************************************************
* aout_FindAndRestart : find the audio output instance and restart
*****************************************************************************
* This is used for callbacks of the configuration variables, and we believe
* that when those are changed, it is a significant change which implies
* rebuilding the audio-device and audio-channels variables.
*****************************************************************************/
int aout_FindAndRestart( vlc_object_t * p_this, const char *psz_name,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
aout_instance_t * p_aout = findAout( pl_Get(p_this) );
(void)psz_name; (void)oldval; (void)newval; (void)p_data;
if ( p_aout == NULL ) return VLC_SUCCESS;
var_Destroy( p_aout, "audio-device" );
var_Destroy( p_aout, "audio-channels" );
aout_Restart( p_aout );
vlc_object_release( p_aout );
return VLC_SUCCESS;
}
/*****************************************************************************
* aout_ChannelsRestart : change the audio device or channels and restart
*****************************************************************************/

1
src/libvlccore.sym

@ -16,7 +16,6 @@ aout_EnableFilter
aout_FifoFirstDate
aout_FifoPop
aout_filter_RequestVout
aout_FindAndRestart
aout_FormatNbChannels
aout_FormatPrepare
aout_FormatPrint

Loading…
Cancel
Save