Audio routing in Virtualbox.

Discussions related to using VirtualBox on Windows hosts.

Audio routing in Virtualbox.

Postby xmusicmatt » 25. Feb 2012, 22:23

Audio routing in Virtualbox.

I have multiple audio devices in my computer.. What I want to do is to send virtual box audio to a specific sound card instead of the default sound card on the windows host machine.. Is this possible? Right now Virtualbox routes its audio out of the default audio card in windows. I can't seem to find a way to route VBox to another audio card within it's application (other apps such as Skype, etc have this ability)
xmusicmatt
 
Posts: 2
Joined: 25. Feb 2012, 22:20

Re: Audio routing in Virtualbox.

Postby michaln » 25. Feb 2012, 22:29

Audio output goes to the default device. VirtualBox isn't Skype.
michaln
Oracle Corporation
 
Posts: 2900
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: Audio routing in Virtualbox.

Postby xmusicmatt » 26. Feb 2012, 04:02

michaln wrote:Audio output goes to the default device. VirtualBox isn't Skype.


I guess "ye get what ye pay for"

Even winamp can route to a different audio output... oh well...
xmusicmatt
 
Posts: 2
Joined: 25. Feb 2012, 22:20

Re: Audio routing in Virtualbox.

Postby Perryg » 26. Feb 2012, 04:24

But not from a different PC.
You must look at this as you having two separate PCs. The only thing that I can think of that would do anything like what you are wanting is an audio server, but then the sound is degraded because it is actually sent over a net connection.
While skype, winamp, Etc. can work because it is actually on the same PC
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Audio routing in Virtualbox.

Postby michaln » 26. Feb 2012, 12:12

xmusicmatt wrote:Even winamp can route to a different audio output... oh well...

Did it ever cross your mind that Skype and Winamp are 100% audio-oriented applications and therefore rather likely to have extensive audio settings? On the other hand, in VirtualBox audio functionality is way down on the list of important features.

Just out of curiosity, where are the settings you want in Microsoft's RDP client or Virtual PC? Those are products comparable to VirtualBox, unlike Skype or WinAmp.
michaln
Oracle Corporation
 
Posts: 2900
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: Audio routing in Virtualbox.

Postby mpack » 2. Mar 2012, 13:45

Mod note: irrelevent trolling messages deleted.
mpack
Site Moderator
 
Posts: 26701
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Audio routing in Virtualbox.

Postby Beppe » 14. Nov 2012, 23:47

So there's really no way you can change the audio routing? I'm using Ubuntu as host and I like to route the sound of the VM to the HDMI audio output, which is playback device 3.

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0

/B
Beppe
 
Posts: 1
Joined: 14. Nov 2012, 23:42

Re: Audio routing in Virtualbox.

Postby jorgensen » 15. Nov 2012, 08:39

The only way I can think of, is a program called AirFoil that can route through a network.
But - there is a significant latency, and Linux is not supported.
jorgensen
 
Posts: 533
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: Audio routing in Virtualbox.

Postby vid » 23. Dec 2012, 20:22

wow, grumpy unimaginative people. Of course it's possible to route audio to a different device on modern Linux. I used pavucontrol. I hope this helps someone!
vid
 
Posts: 1
Joined: 23. Dec 2012, 20:21

Re: Audio routing in Virtualbox.

Postby Perryg » 23. Dec 2012, 21:01

vid wrote:wow, grumpy unimaginative people. Of course it's possible to route audio to a different device on modern Linux. I used pavucontrol. I hope this helps someone!

Great but this is a windows host question and not Linux. Still Pulse audio (has audio server capability) could be installed on Windows but it is not default. Not to mention that the question was how to do this with VirtualBox not various hosts.
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Audio routing in Virtualbox.

Postby jorgensen » 24. Dec 2012, 10:51

Actually it could be solved by having more than one sound card in VirtualBox, like networking, and include routing like Virtual Audio Cable at the host.

Looking forward to this feature, which would improve VirtualBox considerable.
jorgensen
 
Posts: 533
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: Audio routing in Virtualbox.

Postby Perryg » 24. Dec 2012, 20:19

jorgensen wrote:Actually it could be solved by having more than one sound card in VirtualBox, like networking, and include routing like Virtual Audio Cable at the host.

Looking forward to this feature, which would improve VirtualBox considerable.


For best results you would need to actually post an enhancement ticket at bugtracker
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Audio routing in Virtualbox.

Postby reaglejr » 3. May 2013, 23:58

I've been using "audio routing" (i.e., selecting the audio device )for years via the VBOX_ALSA_DAC_DEV and VBOX_ALSA_ADC_DEV env variables with the VBox 4.1.* series. However, this doesn't seem to work with the 4.2 series. Now that Ubuntu 13.04 is out I'd like to upgrade, but I don't see a 4.1 for 13.04? Does/will 4.2 support this feature, or will you continue to provide 4.1 builds? Thanks!
reaglejr
 
Posts: 4
Joined: 31. Oct 2012, 15:07

Re: Audio routing in Virtualbox.

Postby reaglejr » 25. Jul 2013, 18:57

I posted a bug about the failure of VBOX_ALSA_ADC_DEV and VBOX_ALSA_DAC_DEV here: https://www.virtualbox.org/ticket/11985
reaglejr
 
Posts: 4
Joined: 31. Oct 2012, 15:07

Re: Audio routing in Virtualbox.

Postby emusic » 12. Dec 2017, 13:44

Perryg wrote:You must look at this as you having two separate PCs.

No, it is incorrect point of view. Separate PCs can communicate only via external, special channels (network, USB, FireWire etc.) while VirtualBox emulates a guest VM on host machine resources, having a direct access to them all. To emulate guest audio hardware, VirtualBox intercepts specific register access, determines which operation is performed (playback, recording, volume control etc.) and translates these operations to the host. To access host audio hardware, VirtualBox acts as a plain user-mode application using DirectSound API. This API allows either to use default playback/recording devices (endpoints) or specify a particular endpoint. Playback and recording streams are fully independent from each other so playback and recording streams may use different hardware adapters at the same time.

Specifying particular audio endpoints instead of using default ones is very simple thing (20-30 lines of C/C++ code for enumeration procedure implementation). Moreover, there is no design problems to emulate more than a single audio adapter in a VM; it is easy to support several virtual audio adapters of different types.

So the only reason why VirtualBox always uses default endpoints is the intentional artificial limitation chosen by the developers. All other explanations given here are not suitable.

BTW, VMware Workstation allows to specify host audio endpoint but has artificial limitations too: only a playback endpoint can be specified. Corresponding recording endpoint is determined by the code automatically. This is all the more strange, because a code determining a corresponding endpoint of the same audio adapter is obviously more complex than a code that selects an endpoint directly by its name or number. So VMware uses more code to implement less functionality.
emusic
 
Posts: 7
Joined: 20. Jun 2008, 08:17
Location: Novosibirsk, Russia
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP, 7, 8, 10

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 27 guests