* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <stdio.h>
-#include <stdlib.h> /* calloc(), malloc(), free() */
#include <string.h>
#include <math.h>
/* Now add user filters */
if( var_Type( p_aout, "visual" ) == 0 )
{
- module_t *p_module;
var_Create( p_aout, "visual", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
text.psz_string = _("Visualizations");
var_Change( p_aout, "visual", VLC_VAR_SETTEXT, &text, NULL );
- val.psz_string = ""; text.psz_string = _("Disable");
+ val.psz_string = (char*)""; text.psz_string = _("Disable");
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "spectrometer"; text.psz_string = _("Spectrometer");
+ val.psz_string = (char*)"spectrometer"; text.psz_string = _("Spectrometer");
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "scope"; text.psz_string = _("Scope");
+ val.psz_string = (char*)"scope"; text.psz_string = _("Scope");
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "spectrum"; text.psz_string = _("Spectrum");
+ val.psz_string = (char*)"spectrum"; text.psz_string = _("Spectrum");
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
/* Look for goom plugin */
- p_module = config_FindModule( VLC_OBJECT(p_aout), "goom" );
- if( p_module )
+ if( module_Exists( VLC_OBJECT(p_aout), "goom" ) )
{
- val.psz_string = "goom"; text.psz_string = "Goom";
+ val.psz_string = (char*)"goom"; text.psz_string = (char*)"Goom";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
}
/* Look for galaktos plugin */
- p_module = config_FindModule( VLC_OBJECT(p_aout), "galaktos" );
- if( p_module )
+ if( module_Exists( VLC_OBJECT(p_aout), "galaktos" ) )
{
- val.psz_string = "galaktos"; text.psz_string = "GaLaktos";
+ val.psz_string = (char*)"galaktos"; text.psz_string = (char*)"GaLaktos";
var_Change( p_aout, "visual", VLC_VAR_ADDCHOICE, &val, &text );
}
if( var_Get( p_aout, "effect-list", &val ) == VLC_SUCCESS )
{
var_Set( p_aout, "visual", val );
- if( val.psz_string ) free( val.psz_string );
+ free( val.psz_string );
}
var_AddCallback( p_aout, "visual", VisualizationCallback, NULL );
}
text.psz_string = _("Equalizer");
var_Change( p_aout, "equalizer", VLC_VAR_SETTEXT, &text, NULL );
- val.psz_string = ""; text.psz_string = _("Disable");
+ val.psz_string = (char*)""; text.psz_string = _("Disable");
var_Change( p_aout, "equalizer", VLC_VAR_ADDCHOICE, &val, &text );
for( i = 0; i < p_config->i_list; i++ )
psz_parser );
vlc_object_detach( p_filter );
- vlc_object_destroy( p_filter );
+ vlc_object_release( p_filter );
psz_parser = psz_next;
continue;
module_Unneed( p_filter, p_filter->p_module );
vlc_object_detach( p_filter );
- vlc_object_destroy( p_filter );
+ vlc_object_release( p_filter );
psz_parser = psz_next;
continue;
static int ReplayGainCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
+ VLC_UNUSED(newval); VLC_UNUSED(p_data);
aout_instance_t *p_aout = (aout_instance_t *)p_this;
int i;
vlc_mutex_lock( &p_aout->mixer_lock );
for( i = 0; i < p_aout->i_nb_inputs; i++ )
ReplayGainSelect( p_aout, p_aout->pp_inputs[i] );
+
+ /* Restart the mixer (a trivial mixer may be in use) */
+ aout_MixerMultiplierSet( p_aout, p_aout->mixer.f_multiplier );
vlc_mutex_unlock( &p_aout->mixer_lock );
return VLC_SUCCESS;
static void ReplayGainSelect( aout_instance_t *p_aout, aout_input_t *p_input )
{
- char *psz_replay_gain = var_GetString( p_aout, "audio-replay-gain-mode" );
+ char *psz_replay_gain = var_GetNonEmptyString( p_aout,
+ "audio-replay-gain-mode" );
int i_mode;
int i_use;
float f_gain;