ports/devel/pwlib and multiple sound devices

Alexander Leidinger Alexander at Leidinger.net
Fri Jul 11 08:00:23 UTC 2008


Quoting Matthias Apitz <matthias.apitz at oclc.org> (from Fri, 11 Jul  
2008 09:36:42 +0200):

>      The above device nodes are only created on demand through the dynamic
>      devfs(5) clone handler.  Users are strongly discouraged to access them
>      directly.  For specific sound card access, please instead use  
> /dev/dsp or
>      /dev/dsp%d.
>      ^^^^^^^^^^
>
> and it works fine with KDE sharing sound with all othe applications;
> what is wrong with /dev/dsp0?

There may be more than one soundcard in the system. By accessing dsp0,  
you hardcode the first detected soundcard. This may be not desired by  
the user.

Either provide the possibility to specify a sound device, or use  
'/dev/dsp', as this allows the user to set the default soundcard. He  
can decide to route '/dev/dsp' to the second or third instead of the  
first detected soundcard via a config mechanism. Here's the relevant  
man page text:
---snip---
hw.snd.default_unit    Default sound card for systems with
		       multiple sound cards.  When using
		       devfs(5), the default device for
		       /dev/dsp.  Equivalent to a symlink from
		       /dev/dsp to
		       /dev/dsp${hw.snd.default_unit}.

hw.snd.default_auto    Enable to automatically assign default
		       sound unit to the most recent attached
		       device.
---snip---

Bye,
Alexander.

-- 
A good programmer is someone who looks both ways before crossing a
one-way street.
		-- Doug Linder

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-multimedia mailing list