Subject: OSS audio emulation [ossaudio(3)] is still source-incompatible with Linux....
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 05/05/2001 21:43:01
[[ I don't know if tech-userlevel is the right place for this, but here goes... ]]

I've seen several programs now that expect to find OPEN_SOUND_SYSTEM
defined in <sys/soundcard.h>.  For example this autoconf macro:

	AC_DEFUN(AC_HAVE_OSS,
	[AC_CACHE_CHECK([for Open Sound System], ac_cv_oss,
	  AC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;],
	    ac_cv_oss="yes", ac_cv_oss="no"))
	if $test "$ac_cv_oss" = "yes" -a -e /dev/dsp; then
	  AC_DEFINE(HAVE_OSS,1)
	  AC_DEFINE(OSS_DEVICE,"/dev/dsp")
	fi])

Why doesn't NetBSD's OSS emulation "just work" with this?  Yes I know
it's an evil ugly API in some ways, but if the NetBSD emulation layer is
intended as a compatibility layer shouldn't it strive to actually be
compatible?

I haven't yet looked about the amount of effort necessary, but it seems
at least on the surface that if the program has to be patched it may as
well be ported all the way to use the native interface and at least then
the original author would have some reason to take the changes back....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>