[Mplayer-cvslog] CVS: main/libao2 ao_alsa9.c,1.32,1.33

Alex Beregszaszi alex at mplayerhq.hu
Sun Jun 8 06:04:29 CEST 2003


Update of /cvsroot/mplayer/main/libao2
In directory mail:/var/tmp.root/cvs-serv20841

Modified Files:
	ao_alsa9.c 
Log Message:
-ao alsa9:hw:0,0 fix by Wojtek Kaniewski <wojtekka at bydg.pdi.net>

Index: ao_alsa9.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_alsa9.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ao_alsa9.c	21 Mar 2003 16:42:50 -0000	1.32
+++ ao_alsa9.c	8 Jun 2003 04:03:59 -0000	1.33
@@ -317,8 +317,12 @@
 	  }
 	  else if (strcmp(*(token_str+i3), "hw") == 0) {
 	    if ((i3 < i2-1) && (strcmp(*(token_str+i3+1), "noblock") != 0) && (strcmp(*(token_str+i3+1), "mmap") != 0)) {
+              char *tmp;
+
 	      alsa_device = alloca(ALSA_DEVICE_SIZE);
 	      snprintf(alsa_device, ALSA_DEVICE_SIZE, "hw:%s", *(token_str+(i3+1)));
+	      if ((tmp = strrchr(alsa_device, '.')) && isdigit(*(tmp+1)))
+                *tmp = ',';
 	      device_set = 1;
 	    }
 		else {
@@ -421,9 +425,9 @@
 	printf("alsa-help: available options are:\n");
 	printf("           mmap: sets mmap-mode\n");
 	printf("           noblock: sets noblock-mode\n");
-	printf("           device-name: sets device name\n");
-	printf("           example -ao alsa9:mmap:noblock:hw:0,3 sets noblock-mode,\n");
-	printf("           mmap-mode and the device-name as first card third device\n");
+	printf("           device-name: sets device name (change comma to point)\n");
+	printf("           example -ao alsa9:mmap:noblock:hw:0.3 sets noblock-mode,\n");
+	printf("           mmap-mode and the device-name as first card fourth device\n");
 	return(0);
       } else {
 		printf("alsa-init: soundcard set to %s\n", alsa_device);



More information about the MPlayer-cvslog mailing list