[Liboss-commit] CVS: liboss/lib Makefile.am,1.20,1.21 liboss.c,1.8,1.9
Brought to you by:
thesin
|
From: Justin <th...@us...> - 2002-11-05 21:34:21
|
Update of /cvsroot/liboss/liboss/lib
In directory usw-pr-cvs1:/tmp/cvs-serv3553/lib
Modified Files:
Makefile.am liboss.c
Log Message:
osscat works perfectly, still working on mpg123, just static
Index: Makefile.am
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Makefile.am 5 Nov 2002 19:48:05 -0000 1.20
+++ Makefile.am 5 Nov 2002 21:34:18 -0000 1.21
@@ -6,8 +6,7 @@
lib_LTLIBRARIES = liboss.la
-liboss_la_SOURCES = esddsp.c \
- liboss.c
+liboss_la_SOURCES = esddsp.c
liboss_la_DEPENDENCIES =
liboss_la_LIBADD = $(COREAUDIO_LDFLAGS) $(LIBDL) $(LIBESD)
liboss_la_LDFLAGS = -export-dynamic \
Index: liboss.c
===================================================================
RCS file: /cvsroot/liboss/liboss/lib/liboss.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- liboss.c 5 Nov 2002 17:16:30 -0000 1.8
+++ liboss.c 5 Nov 2002 21:34:18 -0000 1.9
@@ -97,10 +97,14 @@
static int initialized = 0;
static pthread_t server;
-/*
int
-oss_open(const char *path, int flags, mode_t mode)
+oss_open(const char *path, int flags, va_list args)
{
+ mode_t mode;
+
+ mode = va_arg (args, int);
+ va_end (args);
+
static char buf[MAXPATHLEN];
if (realpath(path, buf) == NULL)
@@ -109,14 +113,16 @@
if (0 == strcmp("/dev/dspW", buf)) {
return oss_audio_open(flags);
} else {
- // FIXME: add mixer stuff
+ /* FIXME: add mixer stuff */
return open(path, flags, mode);
}
}
int
-oss_ioctl(int fd, unsigned long com, void *argp)
+oss_ioctl(int fd, unsigned long com, va_list args)
{
+ void *argp;
+
if (IOCGROUP(com) == 'P')
return oss_audio_ioctl(fd, com, argp);
else if (IOCGROUP(com) == 'M')
@@ -128,14 +134,16 @@
static int
oss_audio_open(int flags)
{
- FIXME: Don't forget recording!
- Set up format defaults.
- setsockopt()
- Close sockets (and alert Mac side) if they're open already.
- Apparently you can't test if a socket is closed at the other end,
- so we have to override close() too.
- Account for multiple, different /dev/blahs (use a table).
- Stop abusing clients.
+ /* FIXME: Don't forget recording!
+ * Set up format defaults.
+ * setsockopt()
+ *
+ * Close sockets (and alert Mac side) if they're open already.
+ * Apparently you can't test if a socket is closed at the other
+ * end, so we have to override close() too.
+ * Account for multiple, different /dev/blahs (use a table).
+ * Stop abusing clients.
+ */
int socks[2];
rw_e rw;
@@ -146,7 +154,9 @@
}
switch (flags & O_ACCMODE) {
- case O_RDONLY: rw = OSS_WRITE; break; // If they want to read, we must write
+ case O_RDONLY: rw = OSS_WRITE; break; /* If they want to
+ * read, we must write
+ */
case O_WRONLY: rw = OSS_READ; break;
case O_RDWR: rw = OSS_RW; break;
default:
@@ -176,7 +186,7 @@
return socks[1];
}
-*/
+
static int
oss_init(void)
{
|