Remote Sound with sndiod
In respect of this thread viewtopic.php?f=60&t=1484 I've moved my posting over to here, as a more general thread about remote sound options/usability. The following is the original posting, that I've moved over to here ...
====
To clarify
unless sndio comes with "alsa compatibility package"
when sndiod is compiled/running on 'slim' running Fatdog ...
sndiod -dddd -a on -f rsnd/1 -L-
sound sourced from 'Fat' running OpenBSD ...
AUDIODEVICE=snd@slim/0 firefox
then Fat's audio plays fine on Slim
It's when I try to use Fatdog as 'Fat' i.e. source the sound to slim - that no sound is heard on slim. So I don't think its a lack of a alsa-compatibility-package as that's the thin end (just pumping sound out to a port), whilst the 'server' end ('slim' audio reading from a port and outputting via alsa) clearly is working OK when sourced from a OpenBSD system.
That aside, sndiod is much more basic than pulseaudio. There's a interesting post here about using pulseaudio to forward sound to a phone
====
That was in regard to using sndiod as the means to forward sound. sndiod isn't in the Fatdog repo (gslapt) but is relatively easily compiled https://sndio.org/
I'm running Fatdog on my laptop (client), that wifi net connects, and where I use x0vncserver on a desktop PC (server) that is running OpenBSD, has the main TV as its monitor, and is hard wired (ethernet). vnc'ing into that server from my laptop I can run firefox-esr ... with that displayed on the laptop and where the sound is also forwarded to the laptops headphones/speakers.
Basic steps for setting up a session involve :
On fatdog (laptop) set sndiod running to (network) listen for sound using my sound card 1
sndiod -d -a on -f rsnd/1 -L- 2>/dev/null
ssh from laptop into the desktop (openbsd) as user spot and in that ssh session I su to root and run X :1 & to create a X session, whilst in root I also max out the sound level and apply the boost
mixerctl outputs.master=255,255
mixerctl outputs.hp_boost=on
exit root and run
DISPLAY=:0 cwm &
i.e. I use cwm window manager in OpenBSD, that is available as part of the base system, could equally be jwm, but that would have to be installed (pkg_add jwm)
I then kick off x0vncserver (note that is a zero), where a password had already been pre-created by running vncpasswd
DISPLAY=:0 x0vncserver -PasswordFile /home/spot/.vnc/passwd -rfbport 5959 -display :0 &
Finally I set firefox esr running where the sound is forwarded to my laptop's IP (192.168.1.5)
DISPLAY=:0 AUDIODEVICE=snd@192.168.1.5/0 firefox-esr &
With that done the server is ready, so I exit the ssh (and terminal), open tigervnc viewer and open up the servers IP, and as per above port 5959 and up pops the vnc session and where any sounds in firefox are played out of my laptops headphones.
I find x0vncserver to be significantly superior to x11vnc, and even when at the other end of the house to where the wifi router is youtube playbacks/sound is still fine.
I did also try a similar setup but where fatdog was both the client and server, but as per the top/first part of this posting hit problems with that.
Clarity has also mentioned XRDP viewtopic.php?p=12480#p12480 and RDP alternatives. So the intent is that this thread can be used as a more general thread for such discussions/findings. Fundamentally they're all much the same thing, screen display and sound on one device being forwarded to another device. Many of the choices involve having to have pulseaudio installed, this posting outlines one alternative to that i.e. where alsa is still the back-end and where sndiod is used as the sound server for that. Step's thread viewtopic.php?p=10980#p10980 is specifically with regard to testing a pulseaudio setup under Fatdog.