Skip to content

audio: expose output stream without a host sink#223

Open
shreyas-blacksmith wants to merge 1 commit into
Code-Hex:mainfrom
useblacksmith:agent/null-audio-output-stream
Open

audio: expose output stream without a host sink#223
shreyas-blacksmith wants to merge 1 commit into
Code-Hex:mainfrom
useblacksmith:agent/null-audio-output-stream

Conversation

@shreyas-blacksmith

Copy link
Copy Markdown

Which issue(s) this PR fixes:

Fixes #222

Additional documentation

This exposes the base VZVirtioSoundDeviceOutputStreamConfiguration through the Go API without assigning a VZHostAudioOutputStreamSink.

The Objective-C constructor already exists in virtualization_12.m; this change adds the matching Go wrapper, constructor, finalizer, interface assertion, and macOS 12 availability coverage. Existing host-audio input and output constructors are unchanged.

Apple documents that the output stream's sink defaults to nil and that omitting a sink suppresses the audio:

https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceoutputstreamconfiguration/sink

This is useful for headless VMs that need to expose a playback device to the guest without depending on or playing through the host's default audio device.

Validation

  • go test . -run '^TestAvailableVersion$' -count=1
  • Downstream end-to-end testing on macOS 15 and macOS 26 guests confirmed that the configured device becomes the default CoreAudio output and supplies render callbacks.

This pull request was prepared with AI assistance and reviewed and validated against the native API and downstream end-to-end behavior.

@shreyas-blacksmith
shreyas-blacksmith marked this pull request as ready for review July 24, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Virtio output stream configuration without a host sink

1 participant