[Mplayer-cvslog] CVS: main/libmpdemux tvi_bsdbt848.c,1.12,1.13

Alex Beregszaszi syncmail at mplayerhq.hu
Tue Apr 6 14:23:12 CEST 2004


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv10777

Modified Files:
	tvi_bsdbt848.c 
Log Message:
netbsd audio support by Bernd Ernesti

Index: tvi_bsdbt848.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_bsdbt848.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- tvi_bsdbt848.c	6 Apr 2004 12:19:40 -0000	1.12
+++ tvi_bsdbt848.c	6 Apr 2004 12:23:09 -0000	1.13
@@ -571,7 +571,11 @@
 /* Audio Configuration */
 
 priv->dspready = TRUE;
+#ifdef __NetBSD__
+priv->dspdev = strdup("/dev/sound");
+#else
 priv->dspdev = strdup("/dev/dsp");
+#endif
 priv->dspsamplesize = 16;
 priv->dspstereo = 1;
 priv->dspspeed = 44100;
@@ -581,9 +585,9 @@
 priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps * 
                      (priv->dspstereo+1);
 
-if((priv->dspfd = open ("/dev/dsp", O_RDONLY, 0)) < 0)
+if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0)
     {
-    perror("/dev/dsp open");
+    perror("dsp open");
     priv->dspready = FALSE;
     } 
 
@@ -601,7 +605,7 @@
    (ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &priv->dspspeed) == -1) ||
    (ioctl(priv->dspfd, SNDCTL_DSP_SETFMT, &priv->dspfmt) == -1)))
     {
-    perror ("configuration of /dev/dsp failed");
+    perror ("configuration of dsp failed");
     close(priv->dspfd);
     priv->dspready = FALSE;
     }




More information about the MPlayer-cvslog mailing list