Audio quality of VM guest

lmnopc

n00b
Joined
Jan 11, 2009
Messages
59
I am wondering if there is any loss in audio quality playing music from a VM guest. If it matters I am running a XP32 guest on Virtualbox with ICHAC97 controller and ALSA driver.

I have tested it and to be honest I can't tell the difference at all so realistically I guess it doesn't matter if in fact there is a loss but I would still like to know.

Thanks
 
Yes there will be a slight quality loss but not from the VM but from the OS in the VM.

When playing sounds in an OS it needs to mix multiple sounds together and adjust the volume and possible balance/bass/treble depending on your settings. Windows Vista (and possibly OSX) sports a lossless mixer, but with Windows XP this results in some quality loss.

I doubt you can hear the difference though.

A more perceivable loss can come from the limitation that an audio card can only output one frequency and bitrate. This means that all sounds played must be up sampled or down sampled to the same frequency/bitrate.

Windows XP is a bit silly here as it choose the samples/bit rate on the first sound played. Since all system sounds are mixed at 22 KHz chances are good that some songs in a MP3 playlist will be down mixed to 22 KHz if it starts playing just as you click something.

Windows Vista does things differently. If multiple sounds play at the same time it mixes the sound into some preset selection (default 24-bit, 48 KHz - Right click on the speaker in the systray, choose playback devices, click properties on the default playback device, go to the advanced tab and look at the default format).

That said, Vista does a better job at upsampling/downsampling than XP.

The biggest problem with audio in Virtual machines is the added latency. Latency is the time it takes the sound from it starts playing to it pass out of the speakers. Vista is by itself quite horrid here, fortunately improved in the Win7 beta, and the VM adds to that.

VirtualBox + XP SP3 seem to have the lowest latency of the VMs I've tried (on a Vista host).

So to sum it up, there will be quality loss but unless XP start down mixing to 22KHz you need good ears to notice. For best quality sound in a VM I suppose you have to run a Windows 7 guest on a Windows 7 host :)
 
Thanks for the detailed response.

For clarification quality loss is made up of:

XP: Lossy mixing + latency
Vista/OSX/Win7: Latency only to a varying degree
Plus additional latency of virtualization for all systems.

Assuming the sound played was mixed at the matching sample/bit rate as what the system is using...

Is this correct?
 
Thanks for the detailed response.

For clarification quality loss is made up of:

XP: Lossy mixing + latency
Vista/OSX/Win7: Latency only to a varying degree
Plus additional latency of virtualization for all systems.

Assuming the sound played was mixed at the matching sample/bit rate as what the system is using...

Is this correct?
Should be. The only pitfalls are 24-bit audio (not sure if the VM supports that) and if the VM implements a "hardware" volume mixer - badly.

The system will output the same sample/bit rate that you're playing back - as long as nothing else is playing. I've not done any experiments on this though.
 
Back
Top