[vlc-commits] macosx: always load audio profile equalizer-preset to playlist

Victorien Le Couviour--Tuffet git at videolan.org
Thu Jul 13 11:24:54 CEST 2017


vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Wed Jun 28 16:08:56 2017 +0200| [bdd3c635095a7b0425b5849c2a676e00c2aeea75] | committer: Jean-Baptiste Kempf

macosx: always load audio profile equalizer-preset to playlist

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bdd3c635095a7b0425b5849c2a676e00c2aeea75
---

 modules/gui/macosx/VLCAudioEffectsWindowController.m | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.m b/modules/gui/macosx/VLCAudioEffectsWindowController.m
index 8ad44f04ce..f062160630 100644
--- a/modules/gui/macosx/VLCAudioEffectsWindowController.m
+++ b/modules/gui/macosx/VLCAudioEffectsWindowController.m
@@ -289,11 +289,11 @@
     NSArray *items = [[[defaults objectForKey:@"AudioEffectProfiles"] objectAtIndex:(NSUInteger) selectedProfile] componentsSeparatedByString:@";"];
 
     /* eq preset */
-    vlc_object_t *p_object = VLC_OBJECT(getAout());
-    if (p_object == NULL)
-        p_object = vlc_object_hold(pl_Get(p_intf));
-    var_SetString(p_object, "equalizer-preset", [B64DecNSStr([items firstObject]) UTF8String]);
-    vlc_object_release(p_object);
+    char const *psz_eq_preset = [B64DecNSStr([items firstObject]) UTF8String];
+    audio_output_t *p_aout = getAout();
+    if (p_aout)
+        var_SetString(p_aout, "equalizer-preset", psz_eq_preset);
+    var_SetString(p_playlist, "equalizer-preset", psz_eq_preset);
 
     /* filter handling */
     NSString *tempString = B64DecNSStr([items objectAtIndex:1]);
@@ -324,7 +324,6 @@
     config_PutInt(p_intf, "equalizer-2pass",[[items objectAtIndex:15] intValue]);
 
     /* set values on-the-fly if we have an aout */
-    audio_output_t *p_aout = getAout();
     if (p_aout) {
         var_SetFloat(p_aout, "compressor-rms-peak", [[items objectAtIndex:2] floatValue]);
         var_SetFloat(p_aout, "compressor-attack", [[items objectAtIndex:3] floatValue]);



More information about the vlc-commits mailing list