So I have been placed by this issues for a couple of years now for Haiku nightly installs using VirtualBox. So I usually get one of three issues…
1 - works fine without issue
2 - audio works, but is choppy
3 - audio not working at all
…restarting media services is a hit-n-miss affair where sometimes it’ll fix it, sometimes it’ll make it worse and sometimes just doesn’t fix anything. After multiple reboots, it sometimes fixes itself. The thing I will say is that Haiku A4 works just fine with audio on VirtualBox. I booted multiple times into Haiku A4 this weekend and audio worked fine. Makes me suspicious that Haiku nightly has some underlying issue concerning audio that is somehow only affecting VirtualBox.
Have you made any ticket?
Not yet, but will probably submit one if i can’t get to the bottom of it.
VirtualBox’s audio subsystem has some very strange quirks. I know of multiple workarounds we’ve had to put in our drivers because of it… Actually come to think of it, the last Kubuntu install I did on VirtualBox had very choppy audio, too. So I’m skeptical this is even our fault.
If A4 has no issues, I wonder if you could transplant the drivers from A4 and see if it’s that. My guess is that it’s either a media_server or scheduler change that is causing the problem, if it even is our fault.
I’ve got it working better under Linux (Fedora 26) by setting VirtualBox to use the ALSA Audio Driver. Windows VirtualBox also seems to have fewer problems (audio better and no network dropouts).
By the way, it’s using the AC97 simulated hardware. The VirtualBox SoundBlaster implementation has been broken for a long time (maybe forever, ancient bug reports still there), not syncing buffer completion with interrupts or something.