Commit c543a40d authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx intf: Fix bug in equalizer

Introduced by [ca17039c]
parent 77dea4ef
...@@ -239,18 +239,17 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, ...@@ -239,18 +239,17 @@ static bool GetFiltersStatus( intf_thread_t *p_intf,
if( p_object == NULL ) if( p_object == NULL )
p_object = (vlc_object_t *)pl_Hold( p_intf ); p_object = (vlc_object_t *)pl_Hold( p_intf );
NSString *preset;
const char *psz_values; const char *psz_values;
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band1 floatValue] ]; NSString *preset = [NSString stringWithFormat:@"%.1f", [o_slider_band1 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band2 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band2 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band3 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band3 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band4 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band4 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band5 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band5 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band6 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band6 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band7 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band7 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band8 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band8 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band9 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f ", [o_slider_band9 floatValue] ];
preset = [NSString stringWithFormat:@"%@ %.1f", preset, [o_slider_band10 floatValue] ]; preset = [preset stringByAppendingFormat:@"%.1f", [o_slider_band10 floatValue] ];
psz_values = [preset UTF8String]; psz_values = [preset UTF8String];
var_SetString( p_object, "equalizer-bands", psz_values ); var_SetString( p_object, "equalizer-bands", psz_values );
...@@ -278,11 +277,11 @@ static bool GetFiltersStatus( intf_thread_t *p_intf, ...@@ -278,11 +277,11 @@ static bool GetFiltersStatus( intf_thread_t *p_intf,
var_SetString( p_object , "equalizer-preset" , preset_list[[sender indexOfSelectedItem]] ); var_SetString( p_object , "equalizer-preset" , preset_list[[sender indexOfSelectedItem]] );
NSString *preset; NSString *preset = @"";
const char *psz_values; const char *psz_values;
for( i = 0; i < 10; i++ ) for( i = 0; i < 10; i++ )
{ {
preset = [NSString stringWithFormat:@"%@ %.1f", preset, eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[i] ]; preset = [preset stringByAppendingFormat:@"%.1f ", eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[i] ];
} }
psz_values = [preset UTF8String]; psz_values = [preset UTF8String];
var_SetString( p_object, "equalizer-bands", psz_values ); var_SetString( p_object, "equalizer-bands", psz_values );
......
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