Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Oct 2021 13:02:23 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        J P <webplication@gmail.com>, freebsd-multimedia@freebsd.org
Subject:   Re: tee-like function via virtual_oss
Message-ID:  <71e67a7e-978f-c70b-8d33-848bb41111cb@selasky.org>
In-Reply-To: <CABcCtUQaFQwD-hsbOXpEUFa-wEQ8aenH5NSj-8o9xqpH05fP1w@mail.gmail.com>
References:  <CABcCtURUbpfGk6U7qjycqEoBp5WKOzYUwuJbjMOXqDCMZtKtPQ@mail.gmail.com> <03103736-8052-5901-b5bf-288a313af874@selasky.org> <b31c652f-49b5-9d93-640a-242cdcce56dc@selasky.org> <CABcCtUSK4MZP8hPYjhNaVR_GT%2BnWghEFLpwviYpkEmwYeRGkxA@mail.gmail.com> <8ff167fe-51e7-2239-2fa6-69a935a5dc11@selasky.org> <CABcCtUQaFQwD-hsbOXpEUFa-wEQ8aenH5NSj-8o9xqpH05fP1w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 10/4/21 12:38 PM, J P wrote:
> Thank you for your email.
> 
> I think the use-case I am facing is different: the player is using
> /dev/dsp0.something, I have no control over it.

And there is no environment variable to override this either?

Did you try:
strings `which mymusicplayer`

One hackish way to get what you want is to:

sysctl hw.snd.basename_clone=1
rm /dev/dsp0
touch /dev/dsp0.9
sysctl hw.snd.basename_clone=0

And create "dsp0" as a virtual_oss instance, routing all virtual_oss 
output to /dev/dsp0.9 instead.

> Furthermore, since I installed virtual_oss all the audio devices have gone
> from PulseAudio, which is a little odd. On top of this, /dev/ is being
> populated with a lot of /dev/dsp0.x (now I have 14) and the number grows
> the more I use audio.

This may indicate a file descriptor leak in your music player. OSSv4 has 
some limits how many FDs can be opened at the same time. You should 
check using ktrace, that it really closes this device.

> 
> Can my goal be achieved with virtual_oss or would you suggest some other
> tool?

See top the the e-mail.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71e67a7e-978f-c70b-8d33-848bb41111cb>