[vlc-devel] [PATCH] libvlc: equalizer: Adapt to new default of ISO frequencies

Ronald Wright logiconcepts819 at gmail.com
Sun Aug 18 22:52:53 CEST 2013


The previous patch that was supposed to follow from another patch that changes
the default bands setting in the equalizer module only makes the
libvlc_audio_equalizer_get_band_frequency() return values from the ISO bands.
Without the other patch applied, the equalizer module itself still uses the VLC
bands, making the values returned by libvlc_audio_equalizer_get_band_frequency()
inconsistent. So, to maintain consistency, the
libvlc_media_player_set_equalizer() function must set the "equalizer-vlcfreqs"
variable to false.
---
 lib/media_player.c        |    2 ++
 src/audio_output/output.c |    1 +
 2 files changed, 3 insertions(+)

diff --git a/lib/media_player.c b/lib/media_player.c
index b4a7250..80c5f82 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1455,12 +1455,14 @@ int libvlc_media_player_set_equalizer( libvlc_media_player_t *p_mi, libvlc_equal
     }
 
     var_SetFloat( p_mi, "equalizer-preamp", f_preamp );
+    var_SetBool( p_mi, "equalizer-vlcfreqs", false );
     var_SetString( p_mi, "equalizer-bands", psz_bands );
 
     audio_output_t *p_aout = input_resource_HoldAout( p_mi->input.p_resource );
     if ( p_aout )
     {
         var_SetFloat( p_aout, "equalizer-preamp", f_preamp );
+        var_SetBool( p_aout, "equalizer-vlcfreqs", false );
         var_SetString( p_aout, "equalizer-bands", psz_bands );
 
         vlc_object_release( p_aout );
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 185eee6..69c06de 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -300,6 +300,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
         }
 
     var_Create (aout, "equalizer-preamp", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
+    var_Create (aout, "equalizer-vlcfreqs", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
     var_Create (aout, "equalizer-bands", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
 
     return aout;
-- 
1.7.10.4




More information about the vlc-devel mailing list