PlatformAudio: IsDeviceSelectionSupported capability#302
Open
MaxHeimbrock wants to merge 4 commits into
Open
Conversation
Consumes the device-selection capability added in rust-sdks#1156. - Bump client-sdk-rust~ to the device-selection commit (regen proto includes PlatformAudioInfo.device_selection_supported). - Regenerate Runtime/Scripts/Proto/AudioFrame.cs. - PlatformAudio.IsDeviceSelectionSupported — false on iOS/Android, true on desktop; lets clients hide device-picker UI where selection has no effect. - Meet sample: guard SetRecordingDevice/SetPlayoutDevice behind the flag. - Add a PlayMode test asserting the flag is true on desktop (editor). Note: submodule points at the rust-sdks PR branch; re-point to the merged SHA once that PR lands. Native binaries are produced by CI from the submodule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cross-link GetDevices(), the uint-index setters, and the GUID setters to IsDeviceSelectionSupported so the mobile (iOS/Android) no-op behavior is discoverable from every device-related member, not just the string overloads. Doc-comment only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Dependency
Based on #293
Summary
Surfaces the platform-audio device-selection capability to Unity clients, and consumes the explicit mobile no-op / desktop-strict behavior from the Rust side.
client-sdk-rust~submodule to the device-selection commit.Runtime/Scripts/Proto/AudioFrame.cs(addsPlatformAudioInfo.DeviceSelectionSupported).PlatformAudio.IsDeviceSelectionSupported—falseon iOS/Android (OS owns routing via AVAudioSession / AudioManager),trueon desktop. Use it to hide device-picker UI where selection has no effect.SetRecordingDevice/SetPlayoutDevicebehind the flag.trueon desktop (editor).Stacking
max/final-platform-audio(Platform audio for Unity #293) — stacked on top of the PlatformAudio test PR (this change extendsTests/PlayMode/PlatformAudioTests.csadded there).Binaries
The committed FFI binaries are unchanged; CI rebuilds FFI from the submodule. The new field only carries a runtime value once native binaries are rebuilt from the merged Rust change.
Verification
Local (macOS, rebuilt FFI +
livekit-server --dev): EditMode 3/3, PlayMode 10/10 — including the newIsDeviceSelectionSupported_TrueOnDesktopcase, which confirms the field round-trips proto → Rust → FFI → C#.On CI the tests sadly don't work, as no platform audio can be acquired:
Looking into your CI runs for the PR for linux-arm64 I see this:
or windows-x64 I see logs like this: