[vlc-devel] [vlc-commits] macosx: add stereo-widen and scaletempo to the audio effects panel
David Fuhrmann
david.fuhrmann at gmail.com
Sun Jul 2 19:22:07 CEST 2017
> Am 02.07.2017 um 17:16 schrieb Felix Paul Kühne <git at videolan.org>:
>
> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jul 2 16:55:00 2017 +0200| [81e955c752eefd57148764ce8261769ee9b8027e] | committer: Felix Paul Kühne
>
> macosx: add stereo-widen and scaletempo to the audio effects panel
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81e955c752eefd57148764ce8261769ee9b8027e
> ---
>
> modules/gui/macosx/UI/AudioEffects.xib | 28 ++++++++++++++++++++++
> .../gui/macosx/VLCAudioEffectsWindowController.h | 6 ++++-
> .../gui/macosx/VLCAudioEffectsWindowController.m | 25 +++++++++++++++----
> 3 files changed, 53 insertions(+), 6 deletions(-)
>
> diff --git a/modules/gui/macosx/UI/AudioEffects.xib b/modules/gui/macosx/UI/AudioEffects.xib
> index 747ee444ff..4cd1fe4cb8 100644
> --- a/modules/gui/macosx/UI/AudioEffects.xib
> +++ b/modules/gui/macosx/UI/AudioEffects.xib
> @@ -56,6 +56,8 @@
> <outlet property="filterNormLevelCheckbox" destination="343" id="Hjr-wL-zji"/>
> <outlet property="filterNormLevelLabel" destination="341" id="xqp-hZ-4Kx"/>
> <outlet property="filterNormLevelSlider" destination="342" id="hKR-wL-WGK"/>
> + <outlet property="filterScaleTempoCheckbox" destination="wYr-HG-zA2" id="Io2-dE-xoC"/>
> + <outlet property="filterStereoEnhancerCheckbox" destination="NUi-0U-gqN" id="aym-ex-fgv"/>
> <outlet property="profilePopup" destination="701" id="fL3-Nz-1t7"/>
> <outlet property="spatializerBand1Label" destination="277" id="pg6-1P-KW1"/>
> <outlet property="spatializerBand1Slider" destination="266" id="Cdn-mQ-kxW"/>
> @@ -987,6 +989,16 @@
> <action selector="filterEnableHeadPhoneVirt:" target="-2" id="PHU-zj-xvf"/>
> </connections>
> </button>
> + <button translatesAutoresizingMaskIntoConstraints="NO" id="wYr-HG-zA2">
> + <rect key="frame" x="14" y="57" width="84" height="18"/>
> + <buttonCell key="cell" type="check" title="Scaletempo" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="9yB-r8-GZB" customClass="VLCHUDCheckboxCell">
> + <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
> + <font key="font" metaFont="smallSystem"/>
> + </buttonCell>
> + <connections>
> + <action selector="filterEnableScaleTempo:" target="-2" id="RyL-Bj-fSg"/>
> + </connections>
> + </button>
> <button translatesAutoresizingMaskIntoConstraints="NO" id="709">
> <rect key="frame" x="14" y="97" width="65" height="18"/>
> <buttonCell key="cell" type="check" title="Karaoke" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="710" customClass="VLCHUDCheckboxCell">
> @@ -1031,12 +1043,26 @@
> <constraint firstAttribute="height" constant="37" id="wQm-1q-xOZ"/>
> </constraints>
> </box>
> + <button translatesAutoresizingMaskIntoConstraints="NO" id="NUi-0U-gqN">
> + <rect key="frame" x="14" y="37" width="109" height="18"/>
> + <buttonCell key="cell" type="check" title="Stereo Enhancer" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="kvM-H1-VS8" customClass="VLCHUDCheckboxCell">
> + <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
> + <font key="font" metaFont="smallSystem"/>
> + </buttonCell>
> + <connections>
> + <action selector="filterEnableStereoEnhancer:" target="-2" id="nQn-vb-PhK"/>
> + </connections>
> + </button>
> </subviews>
> <constraints>
> <constraint firstItem="343" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="17" id="807-K7-OVI"/>
> + <constraint firstItem="wYr-HG-zA2" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="17" id="AAR-fI-Drg"/>
> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="344" secondAttribute="trailing" constant="17" id="Bt0-CZ-zNA"/>
> <constraint firstItem="727" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="19" id="CP6-RB-2oD"/>
> + <constraint firstItem="NUi-0U-gqN" firstAttribute="top" secondItem="wYr-HG-zA2" secondAttribute="bottom" constant="8" id="ERP-Pe-oQ9"/>
> <constraint firstItem="709" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="17" id="KH7-bt-QAy"/>
> + <constraint firstItem="NUi-0U-gqN" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="17" id="N7H-Mp-U0I"/>
> + <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="NUi-0U-gqN" secondAttribute="trailing" constant="17" id="N91-oo-QEw"/>
> <constraint firstItem="344" firstAttribute="leading" secondItem="340" secondAttribute="leading" constant="17" id="TT3-Ns-bah"/>
> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="343" secondAttribute="trailing" constant="17" id="U6r-dx-G3F"/>
> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="709" secondAttribute="trailing" constant="17" id="XNI-EE-bK7"/>
> @@ -1044,6 +1070,8 @@
> <constraint firstItem="344" firstAttribute="top" secondItem="709" secondAttribute="bottom" constant="8" id="hm2-YQ-yW3"/>
> <constraint firstItem="343" firstAttribute="top" secondItem="340" secondAttribute="top" constant="17" id="io6-vx-Ttr"/>
> <constraint firstItem="eB4-KX-Qdy" firstAttribute="top" secondItem="343" secondAttribute="bottom" constant="1" id="lSW-6i-4TX"/>
> + <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="wYr-HG-zA2" secondAttribute="trailing" constant="17" id="qCX-pR-3fB"/>
> + <constraint firstItem="wYr-HG-zA2" firstAttribute="top" secondItem="344" secondAttribute="bottom" constant="8" id="s4V-di-NZX"/>
> <constraint firstItem="709" firstAttribute="top" secondItem="727" secondAttribute="bottom" constant="9" id="yUQ-aD-K7C"/>
> </constraints>
> </view>
> diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.h b/modules/gui/macosx/VLCAudioEffectsWindowController.h
> index b7ae8231e5..356aba6d89 100644
> --- a/modules/gui/macosx/VLCAudioEffectsWindowController.h
> +++ b/modules/gui/macosx/VLCAudioEffectsWindowController.h
> @@ -1,7 +1,7 @@
> /*****************************************************************************
> * VLCAudioEffectsWindowController.h: MacOS X interface module
> *****************************************************************************
> - * Copyright (C) 2004-2015 VLC authors and VideoLAN
> + * Copyright (C) 2004-2017 VLC authors and VideoLAN
> * $Id$
> *
> * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
> @@ -103,6 +103,8 @@
> @property (readwrite, weak) IBOutlet NSSlider *filterNormLevelSlider;
> @property (readwrite, weak) IBOutlet NSTextField *filterNormLevelLabel;
> @property (readwrite, weak) IBOutlet NSButton *filterKaraokeCheckbox;
> + at property (readwrite, weak) IBOutlet NSButton *filterScaleTempoCheckbox;
> + at property (readwrite, weak) IBOutlet NSButton *filterStereoEnhancerCheckbox;
>
> @property (strong) VLCPopupPanelController *popupPanel;
> @property (strong) VLCTextfieldPanelController *textfieldPanel;
> @@ -136,5 +138,7 @@
> - (IBAction)filterEnableVolumeNorm:(id)sender;
> - (IBAction)filterVolumeNormSliderUpdated:(id)sender;
> - (IBAction)filterEnableKaraoke:(id)sender;
> +- (IBAction)filterEnableScaleTempo:(id)sender;
> +- (IBAction)filterEnableStereoEnhancer:(id)sender;
>
> @end
> diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.m b/modules/gui/macosx/VLCAudioEffectsWindowController.m
> index 444edbbf37..d5acbbc887 100644
> --- a/modules/gui/macosx/VLCAudioEffectsWindowController.m
> +++ b/modules/gui/macosx/VLCAudioEffectsWindowController.m
> @@ -1,7 +1,7 @@
> /*****************************************************************************
> * VLCAudioEffectsWindowController.m: MacOS X interface module
> *****************************************************************************
> - * Copyright (C) 2004-2015 VLC authors and VideoLAN
> + * Copyright (C) 2004-2017 VLC authors and VideoLAN
> * $Id$
> *
> * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
> @@ -118,7 +118,6 @@
> [_compressorBand6Label setStringValue:_NS("Knee radius")];
> [_compressorBand7Label setStringValue:_NS("Makeup gain")];
>
> -
> /* Spatializer */
> [_spatializerEnableCheckbox setTitle:_NS("Enable Spatializer")];
> [_spatializerResetButton setTitle:_NS("Reset")];
> @@ -133,6 +132,8 @@
> [_filterNormLevelCheckbox setTitle:_NS("Volume normalization")];
> [_filterNormLevelLabel setStringValue:_NS("Maximum level")];
> [_filterKaraokeCheckbox setTitle:_NS("Karaoke")];
> + [_filterScaleTempoCheckbox setTitle:_NS("Scaletempo")];
> + [_filterStereoEnhancerCheckbox setTitle:_NS("Stereo Enhancer")];
>
> /* generic */
> [[_tabView tabViewItemAtIndex:[_tabView indexOfTabViewItemWithIdentifier:@"equalizer"]] setLabel:_NS("Equalizer")];
> @@ -944,11 +945,15 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> if (psz_afilters) {
> [_filterHeadPhoneCheckbox setState: (NSInteger)strstr(psz_afilters, "headphone") ];
> [_filterKaraokeCheckbox setState: (NSInteger)strstr(psz_afilters, "karaoke") ];
> + [_filterScaleTempoCheckbox setState: (NSInteger)strstr(psz_afilters, "scaletempo") ];
> + [_filterStereoEnhancerCheckbox setState: (NSInteger)strstr(psz_afilters, "stereo_widen") ];
> bEnable_normvol = strstr(psz_afilters, "normvol") != NULL;
> free(psz_afilters);
> } else {
> [_filterHeadPhoneCheckbox setState: NSOffState];
> [_filterKaraokeCheckbox setState: NSOffState];
> + [_filterScaleTempoCheckbox setState: NSOffState];
> + [_filterStereoEnhancerCheckbox setState: NSOffState];
> }
>
> [_filterNormLevelSlider setEnabled:bEnable_normvol];
> @@ -960,14 +965,14 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>
> - (IBAction)filterEnableHeadPhoneVirt:(id)sender
> {
> - [self setAudioFilter: "headphone" on:[sender state]];
> + [self setAudioFilter:"headphone" on:[sender state]];
> }
>
> - (IBAction)filterEnableVolumeNorm:(id)sender
> {
> [_filterNormLevelSlider setEnabled:[sender state]];
> [_filterNormLevelLabel setEnabled:[sender state]];
> - [self setAudioFilter: "normvol" on:[sender state]];
> + [self setAudioFilter:"normvol" on:[sender state]];
> }
>
> - (IBAction)filterVolumeNormSliderUpdated:(id)sender
> @@ -984,7 +989,17 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>
> - (IBAction)filterEnableKaraoke:(id)sender
> {
> - [self setAudioFilter: "karaoke" on:[sender state]];
> + [self setAudioFilter:"karaoke" on:[sender state]];
> +}
> +
> +- (IBAction)filterEnableScaleTempo:(id)sender
> +{
> + [self setAudioFilter:"scaletempo" on:[sender state]];
> +}
> +
> +- (IBAction)filterEnableStereoEnhancer:(id)sender
> +{
> + [self setAudioFilter:"stereo_widen" on:[sender state]];
> }
>
Hi Felix,
Could you recheck if this is everything needed to add a new filter, with respects to profiles?
I’m suspecting that in profileSelectorAction:, where all old filters are disabled, the new filters need to be added as well.
BR. David
More information about the vlc-devel
mailing list