Ejemplo n.º 1
0
static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
                       vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
    aout_instance_t *p_aout = (aout_instance_t *)p_this;
    char *psz_mode = newval.psz_string;
    int i_ret;
    (void)psz_cmd; (void)oldval; (void)p_data;

    if( !psz_mode || !*psz_mode )
    {
        i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
                                     false );
    }
    else
    {
        var_Create( p_aout, "equalizer-preset", VLC_VAR_STRING );
        var_SetString( p_aout, "equalizer-preset", psz_mode );
        i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
                                     true );
    }

    /* That sucks */
    if( i_ret == 1 )
        AoutInputsMarkToRestart( p_aout );
    return VLC_SUCCESS;
}
Ejemplo n.º 2
0
static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
                       vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
    aout_instance_t *p_aout = (aout_instance_t *)p_this;
    char *psz_mode = newval.psz_string;
    vlc_value_t val;
    int i;
    int i_ret;

    if( !psz_mode || !*psz_mode )
    {
        i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
                                     VLC_FALSE );
    }
    else
    {
        val.psz_string = psz_mode;
        var_Create( p_aout, "equalizer-preset", VLC_VAR_STRING );
        var_Set( p_aout, "equalizer-preset", val );
        i_ret = ChangeFiltersString( p_aout, "audio-filter", "equalizer",
                                     VLC_TRUE );

    }

    /* That sucks */
    if( i_ret == 1 )
    {
        for( i = 0; i < p_aout->i_nb_inputs; i++ )
        {
            p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
        }
    }

    return VLC_SUCCESS;
}
Ejemplo n.º 3
0
void ExtraPanel::OnNormvol( wxCommandEvent &event )
{
    aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
                                 VLC_OBJECT_AOUT, FIND_ANYWHERE);
    ChangeFiltersString( p_intf , p_aout, "normvol",
                         event.IsChecked() ? VLC_TRUE : VLC_FALSE );
    if( p_aout != NULL )
        vlc_object_release( p_aout );
}
Ejemplo n.º 4
0
static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
                       vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
    aout_instance_t *p_aout = (aout_instance_t *)p_this;
    char *psz_mode = newval.psz_string;
    (void)psz_cmd; (void)oldval; (void)p_data;

    if( !psz_mode || !*psz_mode )
    {
        ChangeFiltersString( p_aout, "audio-visual", "goom", false );
        ChangeFiltersString( p_aout, "audio-visual", "visual", false );
        ChangeFiltersString( p_aout, "audio-visual", "projectm", false );
    }
    else
    {
        if( !strcmp( "goom", psz_mode ) )
        {
            ChangeFiltersString( p_aout, "audio-visual", "visual", false );
            ChangeFiltersString( p_aout, "audio-visual", "goom", true );
            ChangeFiltersString( p_aout, "audio-visual", "projectm", false );
        }
        else if( !strcmp( "projectm", psz_mode ) )
        {
            ChangeFiltersString( p_aout, "audio-visual", "visual", false );
            ChangeFiltersString( p_aout, "audio-visual", "goom", false );
            ChangeFiltersString( p_aout, "audio-visual", "projectm", true );
        }
        else
        {
            var_Create( p_aout, "effect-list", VLC_VAR_STRING );
            var_SetString( p_aout, "effect-list", psz_mode );

            ChangeFiltersString( p_aout, "audio-visual", "goom", false );
            ChangeFiltersString( p_aout, "audio-visual", "visual", true );
            ChangeFiltersString( p_aout, "audio-visual", "projectm", false );
        }
    }

    /* That sucks */
    AoutInputsMarkToRestart( p_aout );

    return VLC_SUCCESS;
}
Ejemplo n.º 5
0
static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
                       vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
    aout_instance_t *p_aout = (aout_instance_t *)p_this;
    char *psz_mode = newval.psz_string;
    vlc_value_t val;
    int i;

    if( !psz_mode || !*psz_mode )
    {
        ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
        ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
        ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE );
    }
    else
    {
        if( !strcmp( "goom", psz_mode ) )
        {
            ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
            ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_TRUE );
            ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE);
        }
        else if( !strcmp( "galaktos", psz_mode ) )
        {
            ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_FALSE );
            ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
            ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_TRUE );
        }
        else
        {
            val.psz_string = psz_mode;
            var_Create( p_aout, "effect-list", VLC_VAR_STRING );
            var_Set( p_aout, "effect-list", val );

            ChangeFiltersString( p_aout, "audio-visual", "goom", VLC_FALSE );
            ChangeFiltersString( p_aout, "audio-visual", "visual", VLC_TRUE );
            ChangeFiltersString( p_aout, "audio-visual", "galaktos", VLC_FALSE);
        }
    }

    /* That sucks */
    for( i = 0; i < p_aout->i_nb_inputs; i++ )
    {
        p_aout->pp_inputs[i]->b_restart = VLC_TRUE;
    }

    return VLC_SUCCESS;
}