Update of /cvsroot/alsa/alsa-oss/alsa
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16922/alsa
Modified Files:
.cvsignore Makefile.am alsa-oss.c
Added Files:
testaoss.in
Log Message:
- fixed oss wrapper mixer open bug (missing code)
- added lmixer to test directory
- ported mmap_test to use oss redirector
- don't compile code != libalsatoss with -lasound
--- NEW FILE: testaoss.in ---
#!/bin/sh
# A simple script to facilitate the use of the OSS compatibility library.
# Usage:
# testaoss <command> <command options and arguments>
[EMAIL PROTECTED]@
ALSA_OSS_WRAPPER=1 LD_PRELOAD=${prefix}/alsa/.libs/libaoss.so $*
Index: .cvsignore
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 9 Feb 2004 12:36:39 -0000 1.1
+++ .cvsignore 12 Feb 2004 17:16:07 -0000 1.2
@@ -1,6 +1,7 @@
Makefile
Makefile.in
aoss
+testaoss
.deps
.libs
*.lo
Index: Makefile.am
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile.am 10 Feb 2004 13:39:55 -0000 1.2
+++ Makefile.am 12 Feb 2004 17:16:07 -0000 1.3
@@ -6,8 +6,10 @@
libaoss_la_SOURCES = alsa-oss.c
libaoss_la_LIBADD = -ldl -lalsatoss
+libalsatoss_la_CFLAGS = @ALSA_CFLAGS@
libalsatoss_la_SOURCES = pcm.c mixer.c
-libalsatoss_la_LIBADD = -lasound
+libalsatoss_la_LDADD = @ALSA_LDFLAGS@
+libalsatoss_la_LIBADD = @ALSA_LIBS@
clean:
rm -f aoss
Index: alsa-oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa/alsa-oss.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- alsa-oss.c 11 Feb 2004 19:09:03 -0000 1.3
+++ alsa-oss.c 12 Feb 2004 17:16:07 -0000 1.4
@@ -71,7 +71,6 @@
static ops_t ops[FD_CLASSES];
typedef struct {
- int count;
fd_class_t class;
void *mmap_area;
} fd_t;
@@ -205,7 +204,15 @@
}
} else if (!strncmp(file, "/dev/mixer", 10)) {
fd = lib_oss_mixer_open(file, oflag);
- fds[fd]->class = FD_OSS_MIXER;
+ if (fd >= 0) {
+ fds[fd] = calloc(sizeof(fd_t), 1);
+ if (fds[fd] == NULL) {
+ ops[FD_OSS_MIXER].close(fd);
+ errno = ENOMEM;
+ return -1;
+ }
+ fds[fd]->class = FD_OSS_MIXER;
+ }
} else {
fd = _open(file, oflag, mode);
if (fd >= 0)
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog