PulseAudio risk assessment

11 replies [Last post]
djdualcore@gmail.com
User offline. Last seen 34 weeks 1 day ago. Offline
Joined: 2010-04-17

I am running Ardour 2.8.2 on Puredyne Linux with JACK 0.3.4. It is working great. I would like to keep it that way.

I have some other OSs in VirtualBox virtual machines that I would like to use to test other audio software. The problem is that VirtualBox does not support JACK. No matter how well everything is working inside the VM I can't hear anything.

VirtualBox does support PulseAudio. How large of a risk am I taking if I install PulseAudio in Puredyne? What are my odds of breaking my perfectly good Puredyne/JACK/Ardour setup?

Neil Clopton
DJ Dual Core

seablade
User offline. Last seen 5 hours 20 min ago. Offline
Joined: 2007-01-22

Well Ardour won't work with Pulse, it NEEDS Jack.

Jack and Pulse have a mixed relationship, you can get one working with the other typically, but it takes some work at least.

Seablade

djdualcore@gmail.com
User offline. Last seen 34 weeks 1 day ago. Offline
Joined: 2010-04-17

So, they CAN coexist, but it may not be clean or smooth?

Should I be looking for a different virtualization solution?

seablade
User offline. Last seen 5 hours 20 min ago. Offline
Joined: 2007-01-22

Personally I wouldn't use a Virtual Machine for anything close to pro audio, do you NEED Jack inside the virtual machines?

Seablade

djdualcore@gmail.com
User offline. Last seen 34 weeks 1 day ago. Offline
Joined: 2010-04-17

No, it isn't a need. It is a want.

What I want is to hear what is going on in the virtual machines. Right now sound doesn't get from the hypervisor to the physical sound card. VirtualBox will not send the output of the virtual sound card to JACK.

I'm not looking to do serious production in the virtual machines. I want to use them to preview software I am not willing to disturb my main setup for.

It sounds to me like I need to find a hypervisor that supports JACK if I want to do things this way, or find another physical machine to test on.

seablade
User offline. Last seen 5 hours 20 min ago. Offline
Joined: 2007-01-22

Ok I think I see what you are saying, try using the alsa_in and alsa_out software by Torben to see if that helps with things. It would be used on the host machine. IIRC it is part of the NetJack2 package.

Seablade

djdualcore@gmail.com
User offline. Last seen 34 weeks 1 day ago. Offline
Joined: 2010-04-17

Thank you!

Also, I realize I gave my version of QjackCtl, not my version of of JACK.

thorgal
User offline. Last seen 1 week 4 days ago. Offline
Joined: 2007-08-03

you could try to use ALSA for VirtualBox (if VB supports ALSA directly) and use an ALSA 2 Jack bridge in the host. See a howto here:

http://alsa.opensrc.org/index.php/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge

djdualcore@gmail.com
User offline. Last seen 34 weeks 1 day ago. Offline
Joined: 2010-04-17

VB does support ALSA, but I don't know what I will get around to trying the ALSA 2 Jack bridge.

It turns out the easy way to get what I want is to connect to the virtual machine with an RDP client. VB has built in RDP/terminal services, which have basic audio functionality.

red_five
User offline. Last seen 16 weeks 3 days ago. Offline
Joined: 2011-10-14

I realize this topic is over a year old, but there is a way of using PulseAudio through JACK. module-jack-sink and module-jack-source are the modules, which set JACK to be the sink from PA and a source to PA. I've used these modules when using JAAA and JAPA to monitor frequency response in a live mix environment (comparing the spectrum from a room mic to the spectrum from a mixer's aux send), while playing background music before & after the worship service using Pithos, a Pandora client which likes PulseAudio. You can load them by default in /etc/pulse/default.pa or ~/.pulse/default.pa.

paul
paul's picture
User offline. Last seen 7 hours 25 min ago. Offline
Joined: 2006-03-16
mcgruff
User offline. Last seen 23 hours 47 min ago. Offline
Joined: 2008-08-30

If you put the following in .asoundrc, everything gets routed to jack including Virtualbox virtual machines (select the alsa driver and the AC97 controller).

There are some apps which don't like the jack plug eg mplayer (although smplayer is OK) but most should work. You may have to connect things up manually in qjackctl (or whatever you're using).

pcm.!default {
    type plug
    slave { pcm "jack" }
}

pcm.jack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}