Claude: add support for multichannel interfaces on iOS/iPadOS#3746
Open
rdica wants to merge 2 commits into
Open
Claude: add support for multichannel interfaces on iOS/iPadOS#3746rdica wants to merge 2 commits into
rdica wants to merge 2 commits into
Conversation
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.
Short description of changes
Adds support for external multichannel interfaces and provides ability to choose inputs on iOS/iPadOS devices.
CHANGELOG: Added support for external multichannel interfaces and ability to choose inputs on iOS/iPadOS devices.
Context: Fixes an issue?
Fixes: 3735
Does this change need documentation? What needs to be documented and how?
I don't know.
Status of this Pull Request
What is missing until this pull request can be merged?
This absolutely needs testing as I have no means to do so.
I don't really expect this to work but hopefully it provides a starting point.
Claude summary:
What was missing:
src/sound/coreaudio-ios/sound.mmhardcoded a 2-channel (stereo) input format on the RemoteIO audio unit and never queriedAVAudioSessionfor a device's actual channel count, so any external multichannel interface (USB/Lightning audio interface) was silently truncated to its first two channels.Changes (
src/sound/coreaudio-ios/sound.{h,mm}):AVAudioSession.maximumInputNumberOfChannels/setPreferredInputNumberOfChannels:/inputNumberOfChannelswhenever a device is selected (SwitchDevice).iNumInChan-wide) and output (still stereo, since iOS playback is always 2-channel)AudioStreamBasicDescriptions applied to the RemoteIO unit.GetAvailableInOutDevices()now lists everyAVAudioSessionPortDescriptionin availableInputs (built-in mic, headset, external interfaces) instead of just "default" vs "built-in mic".UpdateInputChannelInfo()to populate per-channel names (fromAVAudioSessionChannelDescription) and clamp the current selection when the device changes.processBufferList()now indexes the interleaved N-channel buffer using the user-selected left/right channel instead of assuming channel 0/1.GetNumInputChannels,GetInputChannelName,SetLeft/RightInputChannel,GetLeft/RightInputChanneloverrides — these plug straight into the existing generic channel-selection UI inclientsettingsdlg.cpp, which is already gated on__APPLE__(true for iOS) and just was never exercised because the backend always reported 2 channels.No GUI changes were needed — the settings dialog's channel-selection frame already supports any platform reporting more than 2 channels.
Caveat: I don't have macOS/Xcode in this environment to actually build and run on a device, so this hasn't been compiled or tested against real hardware — please build it in Xcode and verify with an actual multichannel interface (e.g. plugged in via USB-C/Lightning) before merging.
END Summary
Checklist