Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Oct 2021 12:01:04 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        J P <webplication@gmail.com>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: tee-like function via virtual_oss
Message-ID:  <601c3042-4f7f-016e-56dd-69dfea382eb2@selasky.org>
In-Reply-To: <CABcCtUR2B4BajCK=FKbpOvkJNMw-4=HDO7BG-L8TrE=DkmvaSg@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> <CABcCtUSF1CS6c4NSKx0WRHUwGffE8azTdC20%2BoUxF_VT6OFYcw@mail.gmail.com> <65abdb25-fc5f-e760-7558-8713dbc2ed50@selasky.org> <CABcCtUR2B4BajCK=FKbpOvkJNMw-4=HDO7BG-L8TrE=DkmvaSg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/23/21 10:57, J P wrote:
> Hi,
> so I finally got some time to play with this thing.
> 
> Virtual_oss does work as you indicate as long as I use sox'splay/rec as in
> your example.
> 
> When I use firefox it does play but when I record there is no sound in the
> recorded file.
> 
> I have firefox compiled as follows:
> Options        :
>          ALSA           : off
>          CANBERRA       : off
>          DBUS           : on
>          DEBUG          : off
>          FFMPEG         : on
>          JACK           : off
>          LIBPROXY       : off
>          LTO            : off
>          OPTIMIZED_CFLAGS: on
>          PROFILE        : on
>          PULSEAUDIO     : on
>          SNDIO          : off
>          TEST           : off
> 
> Firefox uses PA, so I can set the playback device to the newly created
> dsp0.9 (it pops up as a duplicate dps0, I mean, by the same name) but it's
> there, reproduces audio and I can set the volume:
> cat /dev/sndstat
> Installed devices:
> pcm0: <ATI R6xx (HDMI)> (play) default
> pcm1: <ATI R6xx (HDMI)> (play)
> pcm2: <Realtek ALC662 rev3 (Analog)> (play/rec)
> pcm3: <Realtek ALC662 rev3 (Front Analog Headphones)> (play)
> pcm4: <USB audio> (play/rec)
> Installed devices from userspace:
> pcm0: <Virtual OSS> (play/rec)
> dsp0.9: <Virtual OSS> (play/rec)
> 
> Note how the "original" device although it's still there, is not functional
> from firefox (i.e. plays no sound anymore), I do have to switch to the new
> device for playback. This behavior is not shown by mplayer, for example,
> that uses whatever the hw.snd_default_unit is, in this case pcm0, and
> works. Sox's play, needs the env AUDIODEV to be set to the news device to
> work, otherwise plays no sound either.
> 
> Nevertheless, the file recorded when firefox reproduces audio, contains
> only 0s.
> Can you suggest how to solve? Thank you.
> BR

Hi,

Just a wild guess:

In Firefox there is something called "about:config".

There you enter the key "media.cubeb.backend" to have the value "oss". 
They you restart firefox.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?601c3042-4f7f-016e-56dd-69dfea382eb2>