Commit d4f01a11 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* patch to the Equalizer-GUI by Jean-Baptiste le Stand <jp.lestang@lestang.org>

parent a2d9eba3
......@@ -38,7 +38,6 @@ DirektX <direktx at freemail.hu> - Hungarian translation
Emmanuel Blindauer <manu at agat.net> - aRts audio output
Espen Skoglund <esk at ira.uka.de> - FreeBSD autoconf and Makefile patches
Ethan C. Baldridge <BaldridgeE at cadmus.com> - directory browsing code
Felix Khne <fkuehne at users.sf.net> - German translation
Frank Chao <frank0624 at gmail.com> - Chinese Traditional translation
Fumio Nakayama <endymion at ca2.so-net.ne.jp> - Japanese translation
Gregory Hazel <ghazel et gmail dot com> - wxWidgets fixes and improvements
......@@ -49,6 +48,7 @@ Jan Gerber <j at v2v dot org> - patch theora decoding aspect ratio
Jan Van Boghout <vlc at macrabbit.com> - iTunes like slider for OSX intf
Javier Varela <tonxabar at hotmail.com> - Spanish translation
Jean-Alexis Montignies <ja at sente.ch> - coreaudio multiple streams fix
Jean-Baptiste le Stang <jp.lestand at lestang.org> - Equalizer-GUI-fixes (OSX)
Jean-Philippe Grimaldi <jeanphi at via.ecp.fr> - bug fixes
Jean-Pierre Kuypers <Kuypers at sri.ucl.ac.be> - French translation
Jeffrey Baker <jwbaker at acm.org> - port of the ALSA plugin to the ALSA 1.0 API
......
......@@ -54,4 +54,11 @@
- (IBAction)twopass:(id)sender;
- (void)windowWillClose:(NSNotification *)aNotification;
- (void)awakeFromNib;
- (void)setValue:(float)value forSlider:(int)index;
- (id)getSliderByIndex:(int)index;
- (void)setBandSlidersValues:(float *)values;
- (void)initBandSliders;
@end
......@@ -153,6 +153,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
}
[o_window setTitle: _NS("Equalizer")];
/*
[o_slider_band1 setFloatValue: 0];
[o_slider_band2 setFloatValue: 0];
[o_slider_band3 setFloatValue: 0];
......@@ -163,7 +164,8 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
[o_slider_band8 setFloatValue: 0];
[o_slider_band9 setFloatValue: 0];
[o_slider_band10 setFloatValue: 0];
*/
[self initBandSliders];
[o_ckb_enable setState: NSOffState];
[o_ckb_2pass setState: NSOffState];
}
......@@ -220,7 +222,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
psz_bands = p_next+1;
}
free( psz_bands_init );
[self setBandSlidersValues:f_band];
/*
[o_slider_band1 setFloatValue: f_band[0]];
[o_slider_band2 setFloatValue: f_band[1]];
[o_slider_band3 setFloatValue: f_band[2]];
......@@ -231,7 +235,8 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
[o_slider_band8 setFloatValue: f_band[7]];
[o_slider_band9 setFloatValue: f_band[8]];
[o_slider_band10 setFloatValue: f_band[9]];
*/
/* Set the the checkboxes */
if( b_enabled == VLC_TRUE )
[o_ckb_enable setState:NSOnState];
......@@ -296,6 +301,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
var_SetFloat( p_object, "equalizer-preamp", eqz_preset_10b[[sender indexOfSelectedItem]]->f_preamp);
[o_slider_preamp setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_preamp];
/*
[o_slider_band1 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[0]];
[o_slider_band2 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[1]];
[o_slider_band3 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[2]];
......@@ -306,7 +312,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
[o_slider_band8 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[7]];
[o_slider_band9 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[8]];
[o_slider_band10 setFloatValue: eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp[9]];
*/
[self setBandSlidersValues:(float *)eqz_preset_10b[[sender indexOfSelectedItem]]->f_amp];
vlc_object_release( p_object );
}
......@@ -406,6 +414,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
[o_popup_presets selectItemAtIndex: i];
[o_slider_preamp setFloatValue: eqz_preset_10b[i]->f_preamp];
[self setBandSlidersValues: (float *)eqz_preset_10b[i]->f_amp];
/*
[o_slider_band1 setFloatValue: eqz_preset_10b[i]->f_amp[0]];
[o_slider_band2 setFloatValue: eqz_preset_10b[i]->f_amp[1]];
[o_slider_band3 setFloatValue: eqz_preset_10b[i]->f_amp[2]];
......@@ -416,7 +427,8 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
[o_slider_band8 setFloatValue: eqz_preset_10b[i]->f_amp[7]];
[o_slider_band9 setFloatValue: eqz_preset_10b[i]->f_amp[8]];
[o_slider_band10 setFloatValue: eqz_preset_10b[i]->f_amp[9]];
*/
if( strcmp( psz_preset, "flat" ) )
{
char psz_bands[100];
......@@ -453,4 +465,51 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
}
- (id)getSliderByIndex:(int)index
{
switch(index)
{
case 0 : return o_slider_band1;
case 1 : return o_slider_band2;
case 2 : return o_slider_band3;
case 3 : return o_slider_band4;
case 4 : return o_slider_band5;
case 5 : return o_slider_band6;
case 6 : return o_slider_band7;
case 7 : return o_slider_band8;
case 8 : return o_slider_band9;
case 9 : return o_slider_band10;
default : return nil;
}
}
- (void)setBandSlidersValues:(float *)values
{
int i = 0;
for (i = 0 ; i<= 9 ; i++)
{
[self setValue:values[i] forSlider:i];
}
}
- (void)initBandSliders
{
int i = 0;
for (i = 0 ; i< 9 ; i++)
{
[self setValue:0.0 forSlider:i];
}
}
- (void)setValue:(float)value forSlider:(int)index
{
id slider = [self getSliderByIndex:index];
if (slider != nil)
{
[slider setFloatValue:value];
}
}
@end
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