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

David Fuhrmann git at videolan.org
Fri Nov 22 21:36:51 CET 2013


vlc/vlc-2.1 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Nov 22 18:40:11 2013 +0100| [d0cb844ec7a5c0eee607e9897421bde408352bc2] | 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
(cherry picked from commit 2f5891bd44f9a5bffcb4d8a2bd918d0787f53c6f)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

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

 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 2acb9c4..6fd20ba 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1584,12 +1584,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