which audio settings are recommended?

Discussions related to using VirtualBox on Linux hosts.

which audio settings are recommended?

Postby stephanecharette » 26. Feb 2020, 11:15

I'm working with some audio software in my Windows 10 guest. Every once in a while (maybe twice per minute), I get audio dropouts for maybe ~1/2 second. Not impossible to work with, but makes things a bit annoying.

So I was looking at the Virtualbox audio settings on the host, and I have no idea if any of these settings are considered better/worse/identical:

Host audio driver:
- OSS
- ALSA
- Pulse

Audio Controller:
- Intel HD
- ICH AC97
- SB16

Right now my guest seem to be configured to use the ALSA driver and Intel HD controller.

Host is Ubuntu 18.10. Guest is Windows 10-64bit with guest additions installed. VB is v6.1.4-136177. Are some of these sound settings preferred/better than others, or is it all the same thing?
stephanecharette
Volunteer
 
Posts: 296
Joined: 10. Nov 2007, 22:03
Location: Kelowna, British Columbia, Canada
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows

Re: which audio settings are recommended?

Postby ghr » 26. Feb 2020, 20:22

Hi Stephane, they are not the same (result from simply trying). Other than that I don't have much of an advice, except that for older OS'es where I have AC97 as well as SB16 drivers typically SB16 delivers better sound. Then again, no clue as to what Win10 would support. One comforting idea: changing settings is usually faster than changing hardware :)
ghr
Volunteer
 
Posts: 335
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Re: which audio settings are recommended?

Postby fth0 » 28. Feb 2020, 00:17

Take a look at the discussion in https://www.virtualbox.org/ticket/18342. It's not about your guest/host combination, but the key is modifying the BufferSizeMs setting, which may be a solution for your dropouts.
fth0
Volunteer
 
Posts: 644
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: which audio settings are recommended?

Postby stephanecharette » 28. Feb 2020, 08:11

fth0 wrote:Take a look at the discussion in https://www.virtualbox.org/ticket/18342.


Thank you, that is incredible! One single command makes such a difference, thank you. Here is what I did:

  • shutdown Windows guest
  • on the host, run this command: VBoxManage setextradata global VBoxInternal2/Audio/ALSAAudio/BufferSizeMs "100"
  • start Windows guest again

In VirtualBox, the audio for that VM was already set to "Host Audio Driver: ALSA Audio Driver". Since the commands mentions "ALSA", I can only imagine this might be important.
stephanecharette
Volunteer
 
Posts: 296
Joined: 10. Nov 2007, 22:03
Location: Kelowna, British Columbia, Canada
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows

Re: which audio settings are recommended?

Postby stephanecharette » 28. Feb 2020, 09:04

I tried to get some details on what that command does. In old versions of VB, apparently this used to default to 100 ms. In new versions of VB, it now uses 250 ms.

So I figured if going from 250 milliseconds to 100 milliseconds made a big improvement...why not try even smaller values?

I tried 25 (no audio at all) as well as 50. With 50, audio was breaking up every once in a while. So I went back to 100, and it sounds awesome yet again.

Also found where that value is stored: ~/.config/VirtualBox/VirtualBox.xml

So in my case anyway, looks like 100 is the way to go: VBoxManage setextradata global VBoxInternal2/Audio/ALSAAudio/BufferSizeMs "100"

For the purpose of Google searches in the future in case people are searching for solutions, the audio software I'm running/testing in VB that seems to need this change is various DAW (digital audio workstations) such as Reaper, Cakewalk, and Ableton Live. They definitely run in VB, but seem to require this audio tweak to run better.
stephanecharette
Volunteer
 
Posts: 296
Joined: 10. Nov 2007, 22:03
Location: Kelowna, British Columbia, Canada
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows

Re: which audio settings are recommended?

Postby stephanecharette » 6. Mar 2020, 11:42

After continuing to work with this VM over the past week, I unfortunately have to report that the problem is definitely not fixed by the change described above. I was just (un)lucky the other night when the audio didn't seem to be dropping out or skipping. But for example right now I'm getting a 0.5 second drop-out in sound every 5-10 seconds. Makes it difficult to listen to any audio.
stephanecharette
Volunteer
 
Posts: 296
Joined: 10. Nov 2007, 22:03
Location: Kelowna, British Columbia, Canada
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu-64bit, Windows


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 18 guests