Skip to content

Add audio device listing and selection APIs - #28

Merged
JamieW105 merged 1 commit into
mainfrom
feat/audio-device-selection
Oct 11, 2026
Merged

JamieW105 merged 1 commit into
mainfrom
feat/audio-device-selection

Conversation

@JamieW105

Copy link
Copy Markdown
Collaborator

Scripts can now list and choose audio devices through Audio.get_output_devices(), get_input_devices(), set_output_device(id), and set_input_device(id) in all language bindings. Lists return opaque IDs and names; passing null chooses the system default.

Windows output switching opens the replacement stream before dropping the current stream, preserving playback on failure. Input selection validates and retains a device; microphone capture is not implemented. Headless platforms return empty lists and report unavailable selection. IDs are scene-local snapshots and must be refreshed after another enumeration of the same direction.

Companion website documentation: Rustic-Game-Engine/docs#20

Validation:

  • 96 engine-play and engine-scripting tests passed; targeted device tests rerun after the final C parser adjustment.
  • Formatting and Clippy for both changed crates passed with warnings denied.
  • Windows native audio module cross-target check and Clippy passed against rodio 0.21.1/cpal 0.16.0.
  • C17 transport test (including escaped Unicode and result lifetime), C++20 compilation, JavaScript syntax and Python compilation passed.
  • Website build, lint, TypeScript, security audit, documentation tests and API example checks passed.
  • Windows installer build is pending in this PR's CI; local execution requires Windows.

@JamieW105

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T08:29:58.173635Z 765f84f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 765f84f3ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

});
Self {
sender: Some(sender),
.spawn(move || native::run(&receiver))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Build the required Windows installer

This new Windows-only audio path has not completed the repository-required packaging validation: the commit’s validation notes explicitly leave the installer build pending in CI. Before treating the feature as complete, run tools/build-windows-installer.ps1 and confirm that it produces a fresh dist\RusticGameEngine-Setup-*.exe; otherwise failures in the Windows integration or installer packaging remain unverified.

AGENTS.md reference: Engine/AGENTS.md:L3-L9

Useful? React with 👍 / 👎.

@JamieW105
JamieW105 marked this pull request as ready for review October 11, 2026 09:00
@JamieW105
JamieW105 merged commit 3cf0f54 into main Oct 11, 2026
8 checks passed
@github-actions
github-actions Bot deleted the feat/audio-device-selection branch October 11, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants