Repository navigation
fix(audio-context): iOS panner routing, multi-output worklets, DelayNode cycles and channelCount - #288
Merged
Conversation
…ode cycles and channelCount - PannerNode mixes its inputs in an NSCChannelMixerNode (clamped-max, two channels) and pans in its own audio unit with the spec's equal-power law for mono and stereo inputs; connecting to or from it uses the shared per-connection routing, so neither end loses its other connections. 'HRTF' pans the same way. - A multi-output AudioWorkletNode plays each output from its own tap unit fed by the worklet's single output bus, since AVAudioEngine drops a unit's other output buses' connections. - A connection that would close a cycle splits a DelayNode on it into a writer, pulled by the main mixer, and a reader that only reads earlier render calls (delay clamped to at least one call); a cycle without a DelayNode is not connected. - AudioNode channelCount, channelCountMode and channelInterpretation on iOS; GainNode, DelayNode and BiquadFilterNode mix new connections to channelCount in clamped-max and explicit modes. - Specs: audio-graph's feedback-loop and explicit channelCount specs run on iOS; new specs for connecting to a PannerNode and for playing both outputs of a worklet at once.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
ℹ️ Note: npm publishing is disabled for pull requests. |
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.
This fixes the iOS
@nativescript/audio-contextgaps the specs still skipped or didn't cover.PannerNode
NSCChannelMixerNode(clamped-max, at most two channels). Panning happens in the panner's own audio unit, using the spec's equal-power law for mono and stereo inputs, times the distance and cone gain.'HRTF'pans the same way as'equalpower'.Multi-output AudioWorkletNode
DelayNode cycles
DelayNodeon the cycle is split:DelayNodeis not made.channelCount / channelCountMode / channelInterpretation
AudioNodeexposes all three on iOS, with the Web Audio defaults per node kind.GainNode,DelayNodeandBiquadFilterNodemix new connections tochannelCount(up to 8) in'clamped-max'and'explicit'modes, with the speakers or discrete rules.Specs (iOS simulator,
audiosuite: 62 passed, 0 failed, 0 skipped)channelCountgain spec now run on iOS.PannerNodekeeps the source's and the panner's other connectionsOnly the specs and iOS files change; the new specs have not been run on Android yet.