From nobody Sat Oct 23 10:01:04 2021 X-Original-To: freebsd-multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B9817180F90D for ; Sat, 23 Oct 2021 10:01:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HbxZ64Hw8z4bkX for ; Sat, 23 Oct 2021 10:01:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1689026050E; Sat, 23 Oct 2021 12:01:17 +0200 (CEST) Message-ID: <601c3042-4f7f-016e-56dd-69dfea382eb2@selasky.org> Date: Sat, 23 Oct 2021 12:01:04 +0200 List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: tee-like function via virtual_oss Content-Language: en-US To: J P Cc: freebsd-multimedia@freebsd.org References: <03103736-8052-5901-b5bf-288a313af874@selasky.org> <8ff167fe-51e7-2239-2fa6-69a935a5dc11@selasky.org> <65abdb25-fc5f-e760-7558-8713dbc2ed50@selasky.org> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4HbxZ64Hw8z4bkX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N 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: (play) default > pcm1: (play) > pcm2: (play/rec) > pcm3: (play) > pcm4: (play/rec) > Installed devices from userspace: > pcm0: (play/rec) > dsp0.9: (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