VirtualBox

Opened 3 years ago

Closed 3 years ago

#20171 closed defect (fixed)

macOS host duplex CoreAudio devices are broken => fixed in SVN/next maintenance

Reported by: csnover Owned by:
Component: audio Version: VirtualBox 6.1.18
Keywords: Cc:
Guest type: all Host type: Mac OS X

Description

VirtualBox will not use an audio device in a macOS host if it is a duplex (both input and output) device.

Such devices did work in VirtualBox 5.0.40; I did not determine the specific version where this broke (I upgraded from 5.0 to 6.1).

Reproduction:

  1. Create a duplex device (see below)
  2. Set the duplex audio device as the default output (and/or input) device in macOS System Preferences
  3. Run a VM

Expected: VirtualBox plays/records audio through the duplex device.

Actual: VirtualBox will not play/record audio. VBox.log says “CoreAudio: No default playback device found” (for output) or “CoreAudio: No default capturing device found” (for input). The DEFAULT flag on the device also isn’t set unless it is set as the system default for both output *and* input (though it still won’t work even then).

Workaround: For output only, Audio MIDI Setup.app can be used to create a “Multi-Output Device” which forwards to the outputs of the duplex audio device. This is not a good workaround, though, since this disables volume control.

To create a duplex device, you can either install one (e.g. kuwatec Audio Loopback, Soundflower, or Boom2), or construct an Aggregate Device following these steps:

  1. Open /Applications/Utilities/Audio MIDI Setup.app
  2. Click the plus icon in the bottom-left corner and choose “Create Aggregate Device”
  3. Select the Aggregate Device from the menu on the left
  4. Tick the “Use” box next to a device with a non-zero “In” column (e.g. “Built-in Microphone”)
  5. Tick the “Use” box next to a device with a non-zero “Out” column (e.g. “Built-in Output”)

There are at least a couple of forum posts about this problem which contain appropriate logs:

https://forums.virtualbox.org/viewtopic.php?f=2&t=92570&p=445771&hilit=duplex#p445906
https://forums.virtualbox.org/viewtopic.php?f=8&t=96119&p=466346&hilit=coreaudio#p466346

The relevant section of my own VBox.log is:

00:00:04.472027 Audio: Initializing Core Audio driver
00:00:04.533481 CoreAudio: Default capturing device is 'USB Advanced Audio Device'
00:00:04.533688 CoreAudio: No default playback device found
00:00:04.533718 Audio: Host driver 'CoreAudio' supports 2 input streams and 2 output streams at once
00:00:04.536723 CoreAudio: Default capturing device is 'USB Advanced Audio Device'
00:00:04.536912 CoreAudio: No default playback device found
00:00:04.536934 Audio: Found 5 devices for driver 'CoreAudio'
00:00:04.536947 Audio: Device 'Built-in Microphone':
00:00:04.536955 Audio: 	Usage           = Input
00:00:04.536963 Audio: 	Flags           = NONE
00:00:04.536970 Audio: 	Input channels  = 2
00:00:04.536978 Audio: 	Output channels = 0
00:00:04.536986 Audio: Device 'USB Advanced Audio Device':
00:00:04.536993 Audio: 	Usage           = Input
00:00:04.537000 Audio: 	Flags           = DEFAULT
00:00:04.537008 Audio: 	Input channels  = 2
00:00:04.537015 Audio: 	Output channels = 0
00:00:04.537023 Audio: Device 'kuwatec Audio Loopback':
00:00:04.537031 Audio: 	Usage           = Duplex
00:00:04.537038 Audio: 	Flags           = NONE
00:00:04.537045 Audio: 	Input channels  = 2
00:00:04.537052 Audio: 	Output channels = 2
00:00:04.537060 Audio: Device 'Built-in Output':
00:00:04.537067 Audio: 	Usage           = Output
00:00:04.537075 Audio: 	Flags           = NONE
00:00:04.537082 Audio: 	Input channels  = 0
00:00:04.537090 Audio: 	Output channels = 2
00:00:04.537097 Audio: Device 'USB Advanced Audio Device':
00:00:04.537105 Audio: 	Usage           = Output
00:00:04.537112 Audio: 	Flags           = NONE
00:00:04.537119 Audio: 	Input channels  = 0
00:00:04.537127 Audio: 	Output channels = 2

Version: at least 6.1.16 & 6.1.18
Host OS: at least macOS 10.14.6 (18G8012)
Guest OS: All (tested Windows 7 32-bit)

Change History (2)

comment:1 by aeichner, 3 years ago

Summary: macOS host duplex CoreAudio devices are brokenmacOS host duplex CoreAudio devices are broken => fixed in SVN/next maintenance

This should be fixed in the next maintenance release, please try the latest testbuild from here. Make sure to disable SIP in order to use the testbuilds as those are not notarized.

comment:2 by aeichner, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use