[vlc-commits] [Git][videolan/vlc][master] macosx: Fix visualizations not appearing for audio media

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Jul 22 11:51:42 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f4f3baf5 by Bob Moriasi at 2025-07-22T11:34:34+00:00
macosx: Fix visualizations not appearing for audio media

- - - - -


1 changed file:

- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -209,9 +209,29 @@
     [self updateFloatOnTopIndicator];
 }
 
+- (BOOL)isVisualizationActive
+{
+    BOOL isVisualActive;
+    VLCPlayerController * const controller = VLCMain.sharedInstance.playQueueController.playerController;
+    audio_output_t * const p_aout = controller.mainAudioOutput;
+    if (!p_aout) {
+        return NO;
+    }
+    
+    char *psz_visual = var_GetString(p_aout, "visual");
+    isVisualActive = psz_visual && psz_visual[0] != '\0';
+    
+    free(psz_visual);
+    aout_Release(p_aout);
+    
+    return isVisualActive;
+}
+
 - (void)updateDecorativeViewVisibilityOnControllerChange:(VLCPlayerController *)controller
 {
-    const BOOL decorativeViewVisible = controller.currentMediaIsAudioOnly;
+    const BOOL isAudioOnly = controller.currentMediaIsAudioOnly;
+    const BOOL isVisualActive = [self isVisualizationActive];
+    const BOOL decorativeViewVisible = isAudioOnly && !isVisualActive;
     NSView * const targetView = decorativeViewVisible ? self.audioDecorativeView : self.voutView;
     self.voutContainingView.subviews = @[targetView];
     [targetView applyConstraintsToFillSuperview];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f4f3baf55ee8fe1ede5194d8ee8ccb461df3721c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f4f3baf55ee8fe1ede5194d8ee8ccb461df3721c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list