[vlc-commits] [Git][videolan/vlc][master] 4 commits: audio_output/coreaudio: Fix mute handling

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri May 17 09:32:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3ebf4bb4 by Claudio Cambra at 2024-05-17T09:09:06+00:00
audio_output/coreaudio: Fix mute handling

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
e7f182e1 by Claudio Cambra at 2024-05-17T09:09:06+00:00
audio_output/auhal: Correctly set mute state on StartAnalog

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
8341b7dd by Claudio Cambra at 2024-05-17T09:09:06+00:00
macosx: Use toggle mute directly

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
872d7690 by Claudio Cambra at 2024-05-17T09:09:06+00:00
audio/apple: Remove b_muted handling in iOS audiounit

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


4 changed files:

- modules/audio_output/apple/audiounit_ios.m
- modules/audio_output/apple/auhal.c
- modules/audio_output/apple/coreaudio_common.c
- modules/gui/macosx/playlist/VLCPlayerController.m


Changes:

=====================================
modules/audio_output/apple/audiounit_ios.m
=====================================
@@ -227,12 +227,7 @@ MuteSet(audio_output_t *p_aout, bool mute)
 static void
 Play(audio_output_t * p_aout, block_t * p_block, vlc_tick_t date)
 {
-    aout_sys_t * p_sys = p_aout->sys;
-
-    if (p_sys->b_muted)
-        block_Release(p_block);
-    else
-        ca_Play(p_aout, p_block, date);
+    ca_Play(p_aout, p_block, date);
 }
 
 #pragma mark initialization
@@ -339,9 +334,6 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
         goto error;
     }
 
-    if (p_sys->b_muted)
-        Pause(p_aout, true, 0);
-
     fmt->channel_type = AUDIO_CHANNEL_TYPE_BITMAP;
     p_aout->pause = Pause;
 


=====================================
modules/audio_output/apple/auhal.c
=====================================
@@ -1105,6 +1105,7 @@ StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt,
 
     /* Set volume for output unit */
     VolumeSet(p_aout, p_sys->f_volume);
+    MuteSet(p_aout, var_InheritBool(p_aout, "mute"));
 
     free(layout);
 


=====================================
modules/audio_output/apple/coreaudio_common.c
=====================================
@@ -238,7 +238,13 @@ ca_Render(audio_output_t *p_aout, uint64_t host_time,
 
         p_sys->started = true;
 
-        memcpy(data, f->p_buffer, tocopy);
+        if (p_sys->b_muted) {
+            if (is_silence != NULL)
+                *is_silence = true;
+            memset(data, 0, tocopy);
+        } else {
+            memcpy(data, f->p_buffer, tocopy);
+        }
 
         data += tocopy;
         bytes -= tocopy;


=====================================
modules/gui/macosx/playlist/VLCPlayerController.m
=====================================
@@ -1711,7 +1711,7 @@ static int BossCallback(vlc_object_t *p_this,
 
 - (void)toggleMute
 {
-    vlc_player_aout_Mute(_p_player, !_mute);
+    vlc_player_aout_ToggleMute(_p_player);
 }
 
 - (audio_output_t *)mainAudioOutput



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/240cfdbd2e41e73024101b3a6839658174ffabd1...872d7690f1627e953e9a72532b4241ceeff46f30

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/240cfdbd2e41e73024101b3a6839658174ffabd1...872d7690f1627e953e9a72532b4241ceeff46f30
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