Skip to content

Make uninitialized audio units available#152

Merged
simlay merged 3 commits intoRustAudio:masterfrom
nico-franco-gomez:uninitialized-audio-unit
Apr 28, 2026
Merged

Make uninitialized audio units available#152
simlay merged 3 commits intoRustAudio:masterfrom
nico-franco-gomez:uninitialized-audio-unit

Conversation

@nico-franco-gomez
Copy link
Copy Markdown
Contributor

@nico-franco-gomez nico-franco-gomez commented Apr 27, 2026

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 AudioUnit instance 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.

Copy link
Copy Markdown
Member

@simlay simlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@simlay simlay merged commit 9b2b23b into RustAudio:master Apr 28, 2026
10 checks passed
@simlay simlay mentioned this pull request Apr 28, 2026
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.

2 participants