Subject: Re: /dev/sound == LINUX /dev/dsp?
To: Lennart Augustsson <lennart@augustsson.net>
From: Richard Rauch <rauch@eecs.ukans.edu>
List: netbsd-help
Date: 06/27/1999 23:05:03
>> The comments in plib for OpenBSD support _seem_ to indicate that
>> /dev/audio is based on a Sun design.  Did NetBSD and OpenBSD independantly
 [...]
>
>A lot of the /dev/audio API predates the split.  And after the split
>OpenBSD has been tracking the NetBSD development.  I don't think they
>have made any incompatible changes to the API, but they might have some
>additional drivers.

Can you shed any light on any relation to Sun?  Here's a comment from one
of the source files (slDSP.cxx):

/* ------------------------------------------------------------ */
/* OpenBSD 2.3 this should be very close to SUN Audio           */
/* ------------------------------------------------------------ */

(slDSP.cxx provides several methods for the slDSP class: ::open(),
::close(), ::read(), ::write(), ::stop(), and a few buffer & timing
related methods.)


Currently, I'm puzzling how to get the configure script to include the X
includes & libraries in the Makefiles (it actually correctly locates them,
but the Makefiles don't explicitly use the X files).  I can do it (and
have done it) manually for each of the ~10 generated Makefiles in the src
& examples directories, but the clean way is to have configure build
correct Makefiles.

Once I've got something that configures cleanly, I can make a package (a
first for me) and send diff's back to the author.  (^&

...THEN I can see about compiling FGFS...


>> >> So, should I be safe in pointing plib's sound to /dev/sound?  Are there
 [...]
>> Partly; I was more concerned with whether there would be any problems,
>> since OSS-support does not seem to be the ``normal'' sound support for
>> NetBSD.
>
>No, it's not the "normal" support, but it is a fairly good emulation of the
>OSS API.  Most application will not notice the difference.

Ignoring pragmatic issues (drivers, commercial support), is there a
technical reason to prefer one to the other?


>> On looking a little closer, I see that plib has already been ported to
 [...]
>
>You're assuming right.  Change those '#if defined(__OpenBSD__)' to
>'#if defined(__OpenBSD__) || defined(__NetBSD__)'

Actually, I'm a fan of sorting things alphabetically when there's no other
obvious order, so I had #if defined(__NetBSD___) || defined(__OpenBSD__).
plib compiles painlessly once all of those (and a few #ifdef's) are
caught, and once the X stuff is forced into the compiler & linker paths;
the joystick stuff doesn't seem to work, but since I don't have a
joystick, I won't worry about that.


  "I probably don't know what I'm talking about." --rauch@eecs.ukans.edu