[vlc-commits] macosx: update EQ frequency labels according to VLC frequency setting
Marvin Scholz
git at videolan.org
Fri Aug 14 20:10:45 CEST 2020
vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Aug 14 19:55:49 2020 +0200| [6f0784095398648de266d076bb5e62d524e5f40d] | committer: Marvin Scholz
macosx: update EQ frequency labels according to VLC frequency setting
An option exists for selecting between VLC frequency bands and ISO frequency
bands for the audio equalizer; however, as of this writing, the text labels in
the macOS interface do not quite reflect the selected option. (For example, if
the option to use ISO frequencies is selected in preferences and VLC is
restarted, VLC frequencies still appear in the effects interface.) This patch
introduces a change that dynamically updates the frequency labels according to
the VLC frequency setting.
(manually cherry picked from commit 392e2feee7fa3347de46fb86977fa7c30d2a0057)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6f0784095398648de266d076bb5e62d524e5f40d
---
modules/gui/macosx/UI/AudioEffects.xib | 10 ++++++++
.../gui/macosx/VLCAudioEffectsWindowController.h | 10 ++++++++
.../gui/macosx/VLCAudioEffectsWindowController.m | 29 ++++++++++++++++++++++
3 files changed, 49 insertions(+)
diff --git a/modules/gui/macosx/UI/AudioEffects.xib b/modules/gui/macosx/UI/AudioEffects.xib
index 1b751e35ed..b76570afaa 100644
--- a/modules/gui/macosx/UI/AudioEffects.xib
+++ b/modules/gui/macosx/UI/AudioEffects.xib
@@ -35,15 +35,25 @@
<outlet property="compressorResetButton" destination="621" id="B33-wI-ncD"/>
<outlet property="compressorView" destination="723" id="Lf1-bS-Ric"/>
<outlet property="equalizerBand10Slider" destination="216" id="XGb-IB-1IO"/>
+ <outlet property="equalizerBand10TextField" destination="111" id="4NH-3f-BCQ"/>
<outlet property="equalizerBand1Slider" destination="198" id="7rF-1A-pv4"/>
+ <outlet property="equalizerBand1TextField" destination="95" id="akP-MF-Ndm"/>
<outlet property="equalizerBand2Slider" destination="200" id="yRm-sh-ahX"/>
+ <outlet property="equalizerBand2TextField" destination="96" id="ara-Pz-sRL"/>
<outlet property="equalizerBand3Slider" destination="202" id="5OD-N2-BPy"/>
+ <outlet property="equalizerBand3TextField" destination="101" id="81b-Za-oun"/>
<outlet property="equalizerBand4Slider" destination="204" id="mW0-5k-BqH"/>
+ <outlet property="equalizerBand4TextField" destination="100" id="RTD-vn-ukR"/>
<outlet property="equalizerBand5Slider" destination="206" id="Ql0-VZ-G95"/>
+ <outlet property="equalizerBand5TextField" destination="102" id="Wfj-ky-8Lu"/>
<outlet property="equalizerBand6Slider" destination="208" id="5rp-16-qZS"/>
+ <outlet property="equalizerBand6TextField" destination="107" id="kFt-de-0Uo"/>
<outlet property="equalizerBand7Slider" destination="210" id="NX9-KD-cd8"/>
+ <outlet property="equalizerBand7TextField" destination="109" id="Lsa-7i-HKt"/>
<outlet property="equalizerBand8Slider" destination="212" id="X9a-hy-G3f"/>
+ <outlet property="equalizerBand8TextField" destination="104" id="r1J-uW-c4E"/>
<outlet property="equalizerBand9Slider" destination="214" id="UCy-aA-wav"/>
+ <outlet property="equalizerBand9TextField" destination="110" id="sMJ-Jm-Z7c"/>
<outlet property="equalizerEnableCheckbox" destination="192" id="eV2-Qt-hd1"/>
<outlet property="equalizerPreampLabel" destination="93" id="F5G-xX-9qX"/>
<outlet property="equalizerPreampSlider" destination="196" id="DFs-vD-QFY"/>
diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.h b/modules/gui/macosx/VLCAudioEffectsWindowController.h
index 03dacbf0e7..3a715b5dd7 100644
--- a/modules/gui/macosx/VLCAudioEffectsWindowController.h
+++ b/modules/gui/macosx/VLCAudioEffectsWindowController.h
@@ -41,15 +41,25 @@
@property (readwrite, weak) IBOutlet NSTextField *equalizerPreampLabel;
@property (readwrite, weak) IBOutlet NSPopUpButton *equalizerPresetsPopup;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand1Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand1TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand2Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand2TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand3Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand3TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand4Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand4TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand5Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand5TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand6Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand6TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand7Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand7TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand8Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand8TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand9Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand9TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerBand10Slider;
+ at property (readwrite, weak) IBOutlet NSTextField *equalizerBand10TextField;
@property (readwrite, weak) IBOutlet NSSlider *equalizerPreampSlider;
/* Compressor */
diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.m b/modules/gui/macosx/VLCAudioEffectsWindowController.m
index 424323394e..cf275ece0d 100644
--- a/modules/gui/macosx/VLCAudioEffectsWindowController.m
+++ b/modules/gui/macosx/VLCAudioEffectsWindowController.m
@@ -683,6 +683,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
{
intf_thread_t *p_intf = getIntf();
playlist_t *p_playlist = pl_Get(p_intf);
+ bool b_vlcfreqs = var_InheritBool(p_playlist, "equalizer-vlcfreqs");
bool b_2p = var_CreateGetBool(p_playlist, "equalizer-2pass");
bool bEnabled = GetEqualizerStatus(p_intf, (char *)"equalizer");
@@ -699,6 +700,34 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
[_equalizerView enableSubviews: bEnabled];
[_equalizerEnableCheckbox setState: bEnabled];
[_equalizerTwoPassCheckbox setState: b_2p];
+
+ /* Set the frequency labels */
+ if (b_vlcfreqs)
+ {
+ [_equalizerBand1TextField setStringValue:@"60"];
+ [_equalizerBand2TextField setStringValue:@"170"];
+ [_equalizerBand3TextField setStringValue:@"310"];
+ [_equalizerBand4TextField setStringValue:@"600"];
+ [_equalizerBand5TextField setStringValue:@"1K"];
+ [_equalizerBand6TextField setStringValue:@"3K"];
+ [_equalizerBand7TextField setStringValue:@"6K"];
+ [_equalizerBand8TextField setStringValue:@"12K"];
+ [_equalizerBand9TextField setStringValue:@"14K"];
+ [_equalizerBand10TextField setStringValue:@"16K"];
+ }
+ else
+ {
+ [_equalizerBand1TextField setStringValue:@"31"];
+ [_equalizerBand2TextField setStringValue:@"63"];
+ [_equalizerBand3TextField setStringValue:@"125"];
+ [_equalizerBand4TextField setStringValue:@"250"];
+ [_equalizerBand5TextField setStringValue:@"500"];
+ [_equalizerBand6TextField setStringValue:@"1K"];
+ [_equalizerBand7TextField setStringValue:@"2K"];
+ [_equalizerBand8TextField setStringValue:@"4K"];
+ [_equalizerBand9TextField setStringValue:@"8K"];
+ [_equalizerBand10TextField setStringValue:@"16K"];
+ }
}
- (id)sliderByIndex:(int)index
More information about the vlc-commits
mailing list