FreeBSD Loopback Audio Virtual Device

Question for all the FreeBSD fans.
Is there a way to create virtual sound devices inside a jail?

Example would be a loopback device.

Trying to make sound work inside the jail, but as I found out, TrueNAS is built with sound functions disabled.

Just wondering…

1 Like

I’ve read all of the relevant topics on those forums. Unfortunately, because sound support is not included in CORE, this won’t work.

If there is no way to create virtual sound inputs and outputs, the a VM will have to be the way forward.

I now know that BUTT works if there is sound input present. FreeBSD (GhostBSD) installed on bare metal detects the metal’s sound cards, including PCI devices.

Going to try to install Cobia now and try that pass-through again.

After that I’ll try CORE with passthrough, as the spice client is not to my liking, and I’m having a hard time getting GhostBSD to run on SCALE KVM.

I was able to create a virtual input device using pulseaudio, now I just need to figure out how to use that input in BUTT or perhaps some other streaming application.

Agreed, it’s totally a PITA.

1 Like

Good news. With pulseaudio, and ffmpeg (built from ports with pulseaudio support) I can simply do ffmpeg -f pulse -i pulseinputdevice -f mp3 icecast://source:password@icecastserver:port/mount to use the pulse source and stream directly to icecast.

EDIT: butt uses portaudio, and unfortunalty portaudio has no support for pulseaudio and vise versa.

EDIT2: and neither does Linphone, see below

2 Likes

And now I see that linphone doesn’t even support pulse audio. So much for that idea. But guess what, baresip does. You just need to build from ports and make sure the g711 codec and pulsaudio support is turned on.

Am now I don’t even need a GUI. It can all be done from the command line.

If anyone is curious about how I got all this to work and why certain things worked and others didn’t, just ask.

Which means you don’t need a VM and can use a jail… all according to Keikaku, Sasuga Victor-sama. @mooglestiltzkin

1 Like

Yes sir, just how I like it.

Update in case anyone is wondering. I have successfully built portaudio with pulseaudio support. I did this by first cloning the portaudio repo from GitHub, then running ./configure (having already installed pulseaudio pkg) and gmake install-recursive

The ./configure command should end up showing pulseaudio as “yes” when it completes.

BUTT now works as expected with this setup.

Still using baresip as my SIP client because Linphone doesn’t support pulseaudio.

1 Like