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

macosx: updated gui for new spatializer values (close #6516)

(cherry picked from commit 6b7628d8e4512631ff1cf3a6d00e147ac2ecbfba)
parent abc06f0f
...@@ -528,33 +528,34 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf, ...@@ -528,33 +528,34 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
else else
[o_spat_enable_ckb setState: NSOffState]; [o_spat_enable_ckb setState: NSOffState];
[o_spat_band1_sld setFloatValue: config_GetFloat( p_intf, "spatializer-roomsize" )]; #define setSlider( bandsld, bandfld, var ) \
[o_spat_band1_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [o_spat_band1_sld floatValue]]]; [bandsld setFloatValue: config_GetFloat( p_intf, var ) * 10.]; \
[o_spat_band2_sld setFloatValue: config_GetFloat( p_intf, "spatializer-width" )]; [bandfld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [bandsld floatValue]]]
[o_spat_band2_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [o_spat_band2_sld floatValue]]];
[o_spat_band3_sld setFloatValue: config_GetFloat( p_intf, "spatializer-wet" )]; setSlider( o_spat_band1_sld, o_spat_band1_fld, "spatializer-roomsize" );
[o_spat_band3_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [o_spat_band3_sld floatValue]]]; setSlider( o_spat_band2_sld, o_spat_band2_fld, "spatializer-width" );
[o_spat_band4_sld setFloatValue: config_GetFloat( p_intf, "spatializer-dry" )]; setSlider( o_spat_band3_sld, o_spat_band3_fld, "spatializer-wet" );
[o_spat_band4_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [o_spat_band4_sld floatValue]]]; setSlider( o_spat_band4_sld, o_spat_band4_fld, "spatializer-dry" );
[o_spat_band5_sld setFloatValue: config_GetFloat( p_intf, "spatializer-damp" )]; setSlider( o_spat_band5_sld, o_spat_band5_fld, "spatializer-damp" );
[o_spat_band5_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [o_spat_band5_sld floatValue]]];
#undef setSlider
} }
- (IBAction)resetSpatializerValues:(id)sender - (IBAction)resetSpatializerValues:(id)sender
{ {
config_PutFloat( p_intf, "spatializer-roomsize", 1.050000 ); config_PutFloat( p_intf, "spatializer-roomsize", .85 );
config_PutFloat( p_intf, "spatializer-width", 10.000000 ); config_PutFloat( p_intf, "spatializer-width", 1. );
config_PutFloat( p_intf, "spatializer-wet", 3.000000 ); config_PutFloat( p_intf, "spatializer-wet", .4 );
config_PutFloat( p_intf, "spatializer-dry", 2.000000 ); config_PutFloat( p_intf, "spatializer-dry", .5 );
config_PutFloat( p_intf, "spatializer-damp", 1.000000 ); config_PutFloat( p_intf, "spatializer-damp", .5 );
audio_output_t * p_aout = getAout(); audio_output_t * p_aout = getAout();
if (p_aout) { if (p_aout) {
var_SetFloat( p_aout, "spatializer-roomsize", 1.050000 ); var_SetFloat( p_aout, "spatializer-roomsize", .85 );
var_SetFloat( p_aout, "spatializer-width", 10.000000 ); var_SetFloat( p_aout, "spatializer-width", 1. );
var_SetFloat( p_aout, "spatializer-wet", 3.000000 ); var_SetFloat( p_aout, "spatializer-wet", .4 );
var_SetFloat( p_aout, "spatializer-dry", 2.000000 ); var_SetFloat( p_aout, "spatializer-dry", .5 );
var_SetFloat( p_aout, "spatializer-damp", 1.000000 ); var_SetFloat( p_aout, "spatializer-damp", .5 );
vlc_object_release( p_aout ); vlc_object_release( p_aout );
} }
[self resetSpatializer]; [self resetSpatializer];
...@@ -581,10 +582,10 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf, ...@@ -581,10 +582,10 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
value = "spatializer-damp"; value = "spatializer-damp";
if( p_aout ) { if( p_aout ) {
var_SetFloat( p_aout, value, [sender floatValue] ); var_SetFloat( p_aout, value, [sender floatValue] / 10. );
vlc_object_release( p_aout ); vlc_object_release( p_aout );
} }
config_PutFloat( p_intf, value, [sender floatValue] ); config_PutFloat( p_intf, value, [sender floatValue] / 10. );
if( sender == o_spat_band1_sld ) if( sender == o_spat_band1_sld )
[o_spat_band1_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [sender floatValue]]]; [o_spat_band1_fld setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [sender floatValue]]];
......
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