Make uninitialized audio units available#152
Merged
simlay merged 3 commits intoRustAudio:masterfrom Apr 28, 2026
Merged
Conversation
simlay
approved these changes
Apr 28, 2026
Member
simlay
left a comment
There was a problem hiding this comment.
LGTM. Though, I'm not sure what the use case for an uninitialized constructor is (I maintain this crate but don't claim to know the intricacies of it).
I ran this through cargo-semver-checks, patched the PR and ran the bevy examples on iOS and macOS. Both worked.
I'll follow up this PR with a patch release PR so you should get fixed via cargo update.
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 motivation for this PR is a problem that I was experiencing with CPAL in combination with a specific driver. It's explained in detail here.
This PR does not change the public API, but extends it. I would argue that it would be much cleaner for a low-level crate like this to deliver each
AudioUnitinstance uninitialized by default, but I didn't want to introduce such a breaking change in here.The default output device snippet was taken from looking at CPAL's implementation of the function with the same name. That seemed like the correct thing to do in my opinion.
If the change seems fine, I would bump the version number and publish it. Right now, this is a pre-requirement for solving my original issue.