JustKernel

Ray Of Hope

Virtualbox – Audio architecture – 2

In addition the architectural changes discussed in the previous post, i also implemented multiple LUNs so that audio samples can be send to multiple audio backends simultaneously for eg. a guest VM is opened in the desktop, also through VRDP. So audio song being played on the guest should be audible on the host desktop and also on the remote system. And we we add to this that guest instance is also getting recorded, then sound should also get redirected from guest to the host for recording. So, same audio samples are getting redirected to the 3 LUNs and then to 3 audio backends.

Similarly, while recording audio can be coming to guest from 3 sources. So a mixer was implemented that will mix the audio and then get it delivered to the guest.

Mixing and splitting of audio involved complex rate control mechanism as it may be possible that some of the sinks (backends abosorbing the sound) are fast and some other are slow. So a ring buffer was implemented in the intermediate audio driver to control the rate of audio packets being transmitted to the host backend. Similar was the case in the reverse direction. (A separate instance of audio driver runs per LUN)

mail_to : anshul_makkar@justkernel.com

Tags:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.