genode/repos/ports/src/virtualbox/devices.cc
Josef Söntgen 5be5191645 vbox: enable preliminary audio support
With this commit preliminary audio support in VirtualBox is enabled.
The backend supports playback as well as recording sounds from within
a guest VM. Depending on how the guest configures the device model
the audio output may sound disorted. If the guest uses buffers that
are too small, i.e., 10 ms or less, frequent buffer underruns will
occure.

To get this low-latency one has also to increase vbox' update hz
to 200 (i.e., 5ms).

Fixes #1647.
2015-08-21 11:00:57 +02:00

63 lines
1.4 KiB
C++

/*
* \brief VirtualBox device models
* \author Norman Feske
* \date 2013-08-20
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is distributed under the terms of the GNU General Public License
* version 2.
*/
/* Genode includes */
#include <base/printf.h>
/* VirtualBox includes */
#include <VBoxDD.h>
#include <VBoxDD2.h>
#define REGISTER(device) \
do { \
rc = pCallbacks->pfnRegister(pCallbacks, &g_##device); \
if (RT_FAILURE(rc)) \
return rc; \
} while (0)
extern "C" int VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
{
int rc = 0;
/* platform */
REGISTER(DevicePcArch);
REGISTER(DevicePcBios);
REGISTER(DeviceI8254);
REGISTER(DeviceI8259);
REGISTER(DeviceDMA);
REGISTER(DeviceMC146818);
REGISTER(DeviceACPI);
REGISTER(DeviceAPIC);
REGISTER(DeviceIOAPIC);
REGISTER(DevicePCI);
REGISTER(DevicePCIBridge);
/* devices */
REGISTER(DevicePS2KeyboardMouse);
REGISTER(DeviceVga);
REGISTER(DeviceFloppyController);
REGISTER(DeviceSerialPort);
REGISTER(DevicePIIX3IDE);
REGISTER(DevicePCNet);
REGISTER(DeviceE1000);
REGISTER(DeviceVMMDev);
REGISTER(DeviceOHCI);
REGISTER(DeviceICHAC97);
REGISTER(DeviceICH6_HDA);
return VINF_SUCCESS;
}