[Mplayer-cvslog] CVS: main/libao2 ao_alsa.c,1.8,1.9

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Oct 17 22:03:57 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv22775/libao2

Modified Files:
	ao_alsa.c 
Log Message:
Only use S/PDIF output when no other alsa device is set, allows to use
external ac3 decoders.


Index: ao_alsa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_alsa.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ao_alsa.c	22 Sep 2004 14:12:53 -0000	1.8
+++ ao_alsa.c	17 Oct 2004 20:03:54 -0000	1.9
@@ -405,6 +405,7 @@
         }
     }
 
+  if (!device_set) {
     /* switch for spdif
      * sets opening sequence for SPDIF
      * sets also the playback and other switches 'on the fly'
@@ -430,24 +431,21 @@
  		s[0], s[1], s[2], s[3]);
 
 	mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3, %i channels\n", channels);
-	device_set = 1;
 	break;
       case 4:
 	strncpy(alsa_device, "surround40", ALSA_DEVICE_SIZE);
-	device_set = 1;
 	break;
     
       case 6:
 	strncpy(alsa_device, "surround51", ALSA_DEVICE_SIZE);
-	device_set = 1;
 	break;
 
       default:
 	mp_msg(MSGT_AO,MSGL_ERR,"alsa-spdif-init: %d channels are not supported\n", channels);
       }
     }
+  else
 
-    if (!device_set)
       {
 	int tmp_device, tmp_subdevice, err;
 
@@ -474,6 +472,7 @@
 	  }
 
 	mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: %d soundcard%s found, using: %s\n", cards+1,(cards >= 0) ? "" : "s", alsa_device);
+      }
       } else {
 		mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: soundcard set to %s\n", alsa_device);
       }




More information about the MPlayer-cvslog mailing list