Commit 79a5d687 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: expose the 'Karaoke' filter in the UI because we can

parent 85aa3320
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
IBOutlet id o_filter_normLevel_ckb; IBOutlet id o_filter_normLevel_ckb;
IBOutlet id o_filter_normLevel_sld; IBOutlet id o_filter_normLevel_sld;
IBOutlet id o_filter_normLevel_lbl; IBOutlet id o_filter_normLevel_lbl;
IBOutlet id o_filter_karaoke_ckb;
} }
/* generic */ /* generic */
...@@ -137,5 +138,6 @@ ...@@ -137,5 +138,6 @@
- (IBAction)filter_enableHeadPhoneVirt:(id)sender; - (IBAction)filter_enableHeadPhoneVirt:(id)sender;
- (IBAction)filter_enableVolumeNorm:(id)sender; - (IBAction)filter_enableVolumeNorm:(id)sender;
- (IBAction)filter_volNormSliderUpdated:(id)sender; - (IBAction)filter_volNormSliderUpdated:(id)sender;
- (IBAction)filter_enableKaraoke:(id)sender;
@end @end
...@@ -132,6 +132,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -132,6 +132,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[o_filter_headPhone_ckb setTitle:_NS("Headphone virtualization")]; [o_filter_headPhone_ckb setTitle:_NS("Headphone virtualization")];
[o_filter_normLevel_ckb setTitle:_NS("Volume normalization")]; [o_filter_normLevel_ckb setTitle:_NS("Volume normalization")];
[o_filter_normLevel_lbl setStringValue:_NS("Maximum level")]; [o_filter_normLevel_lbl setStringValue:_NS("Maximum level")];
[o_filter_karaoke_ckb setTitle:_NS("Karaoke")];
/* generic */ /* generic */
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"equalizer"]] setLabel:_NS("Equalizer")]; [[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"equalizer"]] setLabel:_NS("Equalizer")];
...@@ -233,6 +234,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -233,6 +234,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
aout_EnableFilter(p_playlist, "compressor", false); aout_EnableFilter(p_playlist, "compressor", false);
aout_EnableFilter(p_playlist, "headphone", false); aout_EnableFilter(p_playlist, "headphone", false);
aout_EnableFilter(p_playlist, "normvol", false); aout_EnableFilter(p_playlist, "normvol", false);
aout_EnableFilter(p_playlist, "karaoke", false);
} }
/* fetch preset */ /* fetch preset */
...@@ -977,10 +979,12 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -977,10 +979,12 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
if (psz_afilters) { if (psz_afilters) {
[o_filter_headPhone_ckb setState: (NSInteger)strstr(psz_afilters, "headphone") ]; [o_filter_headPhone_ckb setState: (NSInteger)strstr(psz_afilters, "headphone") ];
[o_filter_normLevel_ckb setState: (NSInteger)strstr(psz_afilters, "normvol") ]; [o_filter_normLevel_ckb setState: (NSInteger)strstr(psz_afilters, "normvol") ];
[o_filter_normLevel_ckb setState: (NSInteger)strstr(psz_afilters, "karaoke") ];
free(psz_afilters); free(psz_afilters);
} else { } else {
[o_filter_headPhone_ckb setState: NSOffState]; [o_filter_headPhone_ckb setState: NSOffState];
[o_filter_normLevel_ckb setState: NSOffState]; [o_filter_normLevel_ckb setState: NSOffState];
[o_filter_karaoke_ckb setState: NSOffState];
} }
[o_filter_normLevel_sld setFloatValue: config_GetFloat(p_intf, "norm-max-level")]; [o_filter_normLevel_sld setFloatValue: config_GetFloat(p_intf, "norm-max-level")];
} }
...@@ -1007,4 +1011,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -1007,4 +1011,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
config_PutFloat(p_intf, "norm-max-level", [o_filter_normLevel_sld floatValue]); config_PutFloat(p_intf, "norm-max-level", [o_filter_normLevel_sld floatValue]);
} }
- (IBAction)filter_enableKaraoke:(id)sender
{
[self setAudioFilter: "karaoke" on:[sender state]];
}
@end @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