Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jul 2008 10:00:02 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Matthias Apitz <matthias.apitz@oclc.org>
Cc:        Steve Ames <steve@energistic.com>, Piet Delport <pjdelport@gmail.com>, multimedia@freebsd.org, Rong-En Fan <rafan@freebsd.org>
Subject:   Re: ports/devel/pwlib and multiple sound devices
Message-ID:  <20080711100002.20844u2b3kvbufwg@webmail.leidinger.net>
In-Reply-To: <20080711073642.GA2149@rebelion.Sisis.de>
References:  <20080706110137.GD2606@svm.csie.ntu.edu.tw> <20080711074951.100037zloqohmbgg@webmail.leidinger.net> <20080711073642.GA2149@rebelion.Sisis.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Matthias Apitz <matthias.apitz@oclc.org> (from Fri, 11 Jul =20
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 the=
m
>      directly.  For specific sound card access, please instead use =20
> /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, =20
you hardcode the first detected soundcard. This may be not desired by =20
the user.

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

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

Bye,
Alexander.

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080711100002.20844u2b3kvbufwg>