Commit ef7d8891 authored by David Fuhrmann's avatar David Fuhrmann

macosx: deactivate spatializer controls if spatializer is disabled

parent 13bedc70
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
IBOutlet id o_comp_band7_lbl; IBOutlet id o_comp_band7_lbl;
/* Spatializer */ /* Spatializer */
IBOutlet id o_spat_view;
IBOutlet id o_spat_enable_ckb; IBOutlet id o_spat_enable_ckb;
IBOutlet id o_spat_reset_btn; IBOutlet id o_spat_reset_btn;
IBOutlet id o_spat_band1_sld; IBOutlet id o_spat_band1_sld;
......
...@@ -905,14 +905,17 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -905,14 +905,17 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
#pragma mark Spatializer #pragma mark Spatializer
- (void)resetSpatializer - (void)resetSpatializer
{ {
BOOL b_enable_spat = NO;
char *psz_afilters; char *psz_afilters;
psz_afilters = config_GetPsz(p_intf, "audio-filter"); psz_afilters = config_GetPsz(p_intf, "audio-filter");
if (psz_afilters) { if (psz_afilters) {
[o_spat_enable_ckb setState: (NSInteger)strstr(psz_afilters, "spatializer") ]; b_enable_spat = strstr(psz_afilters, "spatializer") != NULL;
free(psz_afilters); free(psz_afilters);
} }
else
[o_spat_enable_ckb setState: NSOffState]; [o_spat_view enableSubviews:b_enable_spat];
[o_spat_enable_ckb setState:(b_enable_spat ? NSOnState : NSOffState)];
#define setSlider(bandsld, bandfld, var) \ #define setSlider(bandsld, bandfld, var) \
[bandsld setFloatValue: config_GetFloat(p_intf, var) * 10.]; \ [bandsld setFloatValue: config_GetFloat(p_intf, var) * 10.]; \
...@@ -949,6 +952,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -949,6 +952,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
- (IBAction)spat_enable:(id)sender - (IBAction)spat_enable:(id)sender
{ {
[o_spat_view enableSubviews:[sender state]];
[self setAudioFilter:"spatializer" on:[sender state]]; [self setAudioFilter:"spatializer" on:[sender state]];
} }
......
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