[Liboss-commit] CVS: liboss/lib esddsp.c,1.9,1.10
Brought to you by:
thesin
|
From: Justin <th...@us...> - 2002-11-06 20:14:46
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv7363/lib
Modified Files:
esddsp.c
Log Message:
Works much much better, gonna see if I can get mpg123 to work now
Index: esddsp.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/esddsp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- esddsp.c 6 Nov 2002 19:10:23 -0000 1.9
+++ esddsp.c 6 Nov 2002 20:14:42 -0000 1.10
@@ -186,7 +186,7 @@
static int
dspctl (int fd, request_t request, void *argp)
{
- static esd_format_t fmt = ESD_STREAM | ESD_PLAY | ESD_MONO;
+ static esd_format_t fmt = ESD_BITS16 | ESD_MONO | ESD_STREAM | ESD_PLAY;
static int speed;
int *arg = (int *) argp;
@@ -257,16 +257,16 @@
done = 1;
- if (write (sndfd, &proto, sizeof (proto)) != sizeof (proto))
+ if (write(sndfd, &proto, sizeof (proto)) != sizeof (proto))
return -1;
- if (write (sndfd, &fmt, sizeof (fmt)) != sizeof (fmt))
+ if (write(sndfd, &fmt, sizeof (fmt)) != sizeof (fmt))
return -1;
- if (write (sndfd, &speed, sizeof (speed)) != sizeof (speed))
+ if (write(sndfd, &speed, sizeof (speed)) != sizeof (speed))
return -1;
- if (write (sndfd, ident, ESD_NAME_MAX) != ESD_NAME_MAX)
+ if (write(sndfd, ident, ESD_NAME_MAX) != ESD_NAME_MAX)
return -1;
- fmt = ESD_STREAM | ESD_PLAY | ESD_MONO;
+ fmt = ESD_BITS16 | ESD_MONO | ESD_STREAM | ESD_PLAY;
speed = 0;
if (use_mixer)
@@ -407,7 +407,7 @@
for (i = (short*)buf; i < (short*)(buf + sz); ++i)
*i = NXSwapShort(*i);
- retval = write(play, buf, sz); /* if it errors, keep going */
+ retval = write(play, buf, sz);
return retval;
}
|