Declare the AVAudioSession dependencies on visionOS#1262
Merged
roderickvd merged 2 commits intoJul 10, 2026
Conversation
The backend already compiles its AVAudioSession path for every non-macOS Apple platform, but block2, objc2-foundation and objc2-avf-audio were only declared for iOS and tvOS, so the visionOS build failed on missing imports.
Contributor
Author
|
The failing #1263 fixes both. |
Member
|
Thanks! Made some minor edits to the changelog and readme. Merging now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CoreAudio backend gates its AVAudioSession code path on every non-macOS Apple platform:
#[cfg(all(target_vendor = "apple", not(target_os = "macos")))]but
block2,objc2-foundationandobjc2-avf-audioare declared only foriosandtvos.On visionOS the code is compiled while the crates are absent, so the build stops at:
This looks like an oversight in #1155, which added
tvosto that list. Everything below is alreadyin place: coreaudio-rs gained visionOS support in RustAudio/coreaudio-rs#148, and mach2 0.6, the
version cpal requires, builds for every Apple vendor.
Builds, on master with rustc 1.97 and Xcode 26.6:
Runtime, on the visionOS 26.2 simulator (
xcrun simctl spawn), built foraarch64-apple-visionos-sim:examples/enumeratereports the CoreAudio host and the default device, 48 kHz, F32, 2 channels out.examples/beepopens an output stream and the sine is audible.SineWavethroughDeviceSinkBuilder::open_default_sinkand exits cleanly.I have not run this on Vision Pro hardware, only on the simulator.
I did not widen the cfg to
all(target_vendor = "apple", not(target_os = "macos")), which is whatthe code gate says. watchOS still fails further down inside coreaudio-rs
(
cannot find value buffer_frame_size), so claiming it in the manifest would only move the error.Adding
visionosalone keeps the manifest honest about what builds today.