The attached patch adds a little script (aoss) to the alsa-oss package 
that sets LD_PRELOAD and then runs its argument list as the command line. 
Not very profound but it might be useful.

James

-- 
James Tappin,               O__      "I forget the punishment for using
[EMAIL PROTECTED]     --  \/`    Microsoft --- Something lingering
http://www.xena.uklinux.net/          with data loss in it I fancy"  
Common subdirectories: alsa-oss/CVS and alsa-oss-copy/CVS
diff -cN alsa-oss/Makefile.am alsa-oss-copy/Makefile.am
*** alsa-oss/Makefile.am	Tue Aug 21 15:12:46 2001
--- alsa-oss-copy/Makefile.am	Wed Oct  3 22:46:53 2001
***************
*** 1,7 ****
--- 1,15 ----
  lib_LTLIBRARIES = libaoss.la
+ bin_SCRIPTS = aoss
+ man_MANS = aoss.1
  
  libaoss_la_SOURCES = alsa-oss.c
  libaoss_la_LIBADD = -ldl -lasound
+ 
+ aoss: aoss.in
+ 	sed -e "s+PREFIX+$(libdir)+" $(srcdir)/aoss.in > aoss
+ 
+ clean:
+ 	rm -f aoss
  
  dist-hook:
  	echo $(VERSION) >> version
diff -cN alsa-oss/aoss.1 alsa-oss-copy/aoss.1
*** alsa-oss/aoss.1	Thu Jan  1 01:00:00 1970
--- alsa-oss-copy/aoss.1	Wed Oct  3 22:52:22 2001
***************
*** 0 ****
--- 1,28 ----
+ .TH AOSS 1 "3 October 2001"
+ .SH NAME
+ aoss \- Wrapper script to facilitate use of the ALSA OSS compatibility
+ library.
+ .SH SYNOPSYS
+ \fBaoss\fP \fIosscommand\fP [arguments]
+ 
+ .SH DESCRIPTION
+ \fBaoss\fP is a simple wrapper script which facilitates the use of the
+ ALSA OSS compatibility library. It just sets the appropriate LD_PRELOAD
+ path and then runs the command.
+ 
+ This is useful in cases where routing settings (which can be made in
+ your .asoundrc file) need to be applied to commands that use the OSS
+ API.
+ 
+ .SS Arguments
+ .TP
+ \fIosscommand\fP
+ A command that uses the OSS API
+ .TP
+ \fIarguments\fP
+ The appropriate arguments and options for the OSS command.
+ .TP
+ 
+ .SH AUTHORS
+ The OSS compatibility library is by Abramo Bagnara <[EMAIL PROTECTED]>
+ The aoss script and this document are by James Tappin <[EMAIL PROTECTED]>
diff -cN alsa-oss/aoss.in alsa-oss-copy/aoss.in
*** alsa-oss/aoss.in	Thu Jan  1 01:00:00 1970
--- alsa-oss-copy/aoss.in	Wed Oct  3 22:33:12 2001
***************
*** 0 ****
--- 1,7 ----
+ #!/bin/sh
+ 
+ # A simple script to facilitate the use of the OSS compatibility library.
+ # Usage:
+ #	aoss <command> <command options and arguments>
+ 
+ LD_PRELOAD=PREFIX/libaoss.so $*

Reply via email to