[Liboss-commit] CVS: liboss/src osscat.c,1.9,1.10
Brought to you by:
thesin
|
From: Justin <th...@us...> - 2002-11-06 18:51:41
|
Update of /cvsroot/liboss/liboss/src
In directory usw-pr-cvs1:/tmp/cvs-serv25516/src
Modified Files:
osscat.c
Log Message:
need to make a liboss_write for write calls, this is just the first version since i need to move some files I'll do that then finish this
Index: osscat.c
===================================================================
RCS file: /cvsroot/liboss/liboss/src/osscat.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- osscat.c 5 Nov 2002 22:07:28 -0000 1.9
+++ osscat.c 6 Nov 2002 18:51:35 -0000 1.10
@@ -1,8 +1,6 @@
#include "config.h"
#include "soundcard.h"
-#include <machine/endian.h>
-#include <machine/byte_order.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -50,14 +48,8 @@
ioctl(play, SNDCTL_DSP_SPEED, &speed);
while ( (sz = read(fd, buf, BUF_SIZE)) > 0 ) {
+ liboss_write(play, buf, sz); /* if it errors, keep going */
-#if BYTE_ORDER != ENDIAN
- short* i;
- for (i = (short*)buf; i < (short*)(buf + sz); ++i)
- *i = NXSwapShort(*i);
-#endif
-
- write(play, buf, sz); /* if it errors, keep going */
}
return 0;
|