I have a virtual machine using apple's sample code on their developer page but i have no audio. How do i create and setup an audio device for the vm?
Configuring audio in apple virtualization framework
You need to add a VZVirtioSoundDeviceConfiguration
to your configuration with streams for input and output. Something like this:
let inputStream = VZVirtioSoundDeviceInputStreamConfiguration()
inputStream.source = VZHostAudioInputStreamSource()
let outputStream = VZVirtioSoundDeviceOutputStreamConfiguration()
outputStream.sink = VZHostAudioOutputStreamSink()
let soundDeviceConfiguration = VZVirtioSoundDeviceConfiguration()
soundDeviceConfiguration.streams = [inputStream, outputStream]
configuration.audioDevices = [soundDeviceConfiguration]