[Liboss-commit] CVS: liboss/lib esddsp.c,1.7,1.8
Brought to you by:
thesin
|
From: Justin <th...@us...> - 2002-11-06 18:51:41
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv25516/lib
Modified Files:
esddsp.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: esddsp.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/esddsp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- esddsp.c 6 Nov 2002 03:14:54 -0000 1.7
+++ esddsp.c 6 Nov 2002 18:51:35 -0000 1.8
@@ -398,3 +398,16 @@
return (*func) (fd);
}
+
+int
+liboss_write (int play, const void *buf, size_t sz)
+{
+ int retval;
+ short* i;
+
+ for (i = (short*)buf; i < (short*)(buf + sz); ++i)
+ *i = NXSwapShort(*i);
+ retval = write(play, buf, sz); /* if it errors, keep going */
+
+ return retval;
+}
|