[vlc-commits] auhal: ignore changed default device in digital mode

David Fuhrmann git at videolan.org
Fri Nov 22 21:30:09 CET 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Nov 22 18:40:11 2013 +0100| [2f5891bd44f9a5bffcb4d8a2bd918d0787f53c6f] | committer: David Fuhrmann

auhal: ignore changed default device in digital mode

This fixes nonfunctional playback when more than one audio device
is installed.

close #9924

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

 modules/audio_output/auhal.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 124be45..f50ff53 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1581,12 +1581,12 @@ static OSStatus DefaultDeviceChangedListener(AudioObjectID inObjectID,  UInt32 i
 
     msg_Dbg(p_aout, "default device changed to %i", defaultDeviceID);
 
-    /* 
-     * The default device id changes to 0 when switching to SPDIF for whatever reason.
-     * We need to ignore that.
-     */
-    if(defaultDeviceID == 0)
+    /* Default device is changed by the os to allow other apps to play sound while in digital
+       mode. But this should not affect ourself. */
+    if (p_aout->sys->b_digital) {
+        msg_Dbg(p_aout, "ignore, as digital mode is active");
         return noErr;
+    }
 
     /* Also ignore events which announce the same device id */
     if(defaultDeviceID == p_aout->sys->i_selected_dev)



More information about the vlc-commits mailing list