Skip to content

Feat/rnaa 243 pannernode - #1227

Open
basiav wants to merge 37 commits into
mainfrom
feat/rnaa-243-pannernode
Open

basiav wants to merge 37 commits into
mainfrom
feat/rnaa-243-pannernode

Conversation

@basiav

@basiav basiav commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Closes the first part of rnaa-243: the equal-power model. HRTF to come in the next PR.

Closes #

⚠️ Breaking changes ⚠️

Introduced changes

  • Implemented PannerNode in the equal-power mode, with the geometric logic in PannerSpatialization.
  • Implemented tests inPannerTest and PannerSpatializationTest.
  • Implemented sample usage component in PannerNode.tsx.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

Comment thread .claude/skills/web-audio-api/SKILL.md
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

WPT non-regression comparison

FAIL — 6 file(s) with new failing subtests · 3 improved section(s) · overall 2717 → 3420 (+703)

Spec section Base pass Head pass Delta
Other 52 56 +4
AudioParam 629 680 +51
PannerNode 75 723 +648

New failing subtests:

  • the-audio-api/the-audioparam-interface/audioparam-nominal-range.html

    • X PannerNode has no AudioParams but test expected [object Object] Got false.
  • the-audio-api/the-audioparam-interface/k-rate-panner-connections.html

    • X Panner: positionX: Channel 0 output[0, 127]: Expected 0.017871391028165817 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.017865682020783424
      [2] 0.017859160900115967
      [3] 0.0
    • X Panner: positionX: Channel 0 output[128, 255]: Expected 0.012888135388493538 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.012837313115596771
      [2] 0.01278657652437687
      [3] 0.
    • X Panner: positionX: Channel 0 output[256, 383]: Expected 0.007589161861687899 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.007558286190032959
      [2] 0.007527560461312532
      [3] 0
    • X Panner: positionX: Channel 0 output[384, 511]: Expected 0.004646968562155962 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.004630437586456537
      [2] 0.00461398484185338
      [3] 0.
    • X Panner: positionX: Channel 0 output[512, 639]: Expected 0.0030441570561379194 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.003034873167052865
      [2] 0.003025629324838519
      [3]
    • X Panner: positionX: Channel 1 output[0, 127]: Expected 0.036486219614744186 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.03659462928771973
      [2] 0.03670265153050423
      [3] 0.036
    • X Panner: positionX: Channel 1 output[128, 255]: Expected 0.044254120439291 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.04426087066531181
      [2] 0.044266924262046814
      [3] 0.044
    • X Panner: positionX: Channel 1 output[256, 383]: Expected 0.04127275571227074 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.041231296956539154
      [2] 0.04118970409035683
      [3] 0.0
    • X Panner: positionX: Channel 1 output[384, 511]: Expected 0.03552864491939545 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.035483863204717636
      [2] 0.03543911501765251
      [3] 0.0
    • X Panner: positionX: Channel 1 output[512, 639]: Expected 0.030223896726965904 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.03018636256456375
      [2] 0.03014889359474182
      [3] 0.0
    • X Panner: positionY: Channel 0 output[0, 127]: Expected 0.03990424424409866 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.03989364206790924
      [2] 0.03988152742385864
      [3] 0.0398
    • X Panner: positionY: Channel 0 output[128, 255]: Expected 0.030709920451045036 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.03061666339635849
      [2] 0.030523570254445076
      [3] 0.
    • X Panner: positionY: Channel 0 output[256, 383]: Expected 0.0209518913179636 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.020894164219498634
      [2] 0.02083669602870941
      [3] 0.02
    • X Panner: positionY: Channel 0 output[384, 511]: Expected 0.01528366282582283 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.015250320546329021
      [2] 0.015217110514640808
      [3] 0.
    • X Panner: positionY: Channel 0 output[512, 639]: Expected 0.011893530376255512 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.01187265943735838
      [2] 0.011851859278976917
      [3] 0.
    • X Panner: positionY: Channel 1 output[0, 127]: Expected 0.08146847784519196 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.08144683390855789
      [2] 0.0814220979809761
      [3] 0.08139
    • X Panner: positionY: Channel 1 output[128, 255]: Expected 0.06269735842943192 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.06250695884227753
      [2] 0.0623169019818306
      [3] 0.062
    • X Panner: positionY: Channel 1 output[256, 383]: Expected 0.04277537018060684 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.0426575131714344
      [2] 0.042540185153484344
      [3] 0.04
    • X Panner: positionY: Channel 1 output[384, 511]: Expected 0.031203115358948708 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.031135044991970062
      [2] 0.031067242845892906
      [3] 0
    • X Panner: positionY: Channel 1 output[512, 639]: Expected 0.024281824007630348 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.02423921413719654
      [2] 0.024196747690439224
      [3] 0.
    • X Panner: positionZ: Channel 0 output[0, 127]: Expected 0.014136482030153275 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.01511145569384098
      [2] 0.01588606834411621
      [3] 0.016
    • X Panner: positionZ: Channel 0 output[128, 255]: Expected 0.0184414591640234 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.01842150278389454
      [2] 0.018401456996798515
      [3] 0.01
    • X Panner: positionZ: Channel 0 output[256, 383]: Expected 0.015519500710070133 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.015496055595576763
      [2] 0.015472627244889736
      [3] 0
    • X Panner: positionZ: Channel 0 output[384, 511]: Expected 0.0127506572753191 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.012731312774121761
      [2] 0.012712005525827408
      [3] 0.0
    • X Panner: positionZ: Channel 0 output[512, 639]: Expected 0.010579535737633705 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.010564862750470638
      [2] 0.010550222359597683
      [3] 0
    • X Panner: positionZ: Channel 1 output[0, 127]: Expected 0.054120492190122604 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.05306839942932129
      [2] 0.052110861986875534
      [3] 0.05
    • X Panner: positionZ: Channel 1 output[128, 255]: Expected 0.03781212493777275 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.0377640463411808
      [2] 0.03771590813994408
      [3] 0.037
    • X Panner: positionZ: Channel 1 output[256, 383]: Expected 0.031430669128894806 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.03138166666030884
      [2] 0.03133271634578705
      [3] 0.0
    • X Panner: positionZ: Channel 1 output[384, 511]: Expected 0.025715913623571396 for all values but found 127 unexpected values:
      Index Actual
      [1] 0.025676341727375984
      [2] 0.02563685178756714
      [3] 0.
  • the-audio-api/the-pannernode-interface/ctor-panner.html

  • the-audio-api/the-pannernode-interface/distance-linear.html

  • the-audio-api/the-pannernode-interface/panner-automation-position.html

  • the-audio-api/the-pannernode-interface/panner-azimuth.html

    • …and 10 more
Unchanged sections (25)
Spec section Base pass Head pass Delta
Processing model 0 0 0
AnalyserNode 138 138 0
AudioBuffer 140 140 0
AudioBufferSourceNode 218 218 0
AudioContext 58 58 0
AudioNode 261 261 0
BiquadFilterNode 275 275 0
ChannelMergerNode 30 30 0
ChannelSplitterNode 7 7 0
ConstantSourceNode 64 64 0
ConvolverNode 203 203 0
DelayNode 104 104 0
DestinationNode 0 0 0
DynamicsCompressorNode 4 4 0
GainNode 15 15 0
IIRFilterNode 87 87 0
MediaElementAudioSourceNode 0 0 0
MediaStreamAudioDestinationNode 1 1 0
MediaStreamAudioSourceNode 0 0 0
OfflineAudioContext 35 35 0
OscillatorNode 104 104 0
PeriodicWave 33 33 0
ScriptProcessorNode 0 0 0
StereoPannerNode 102 102 0
WaveShaperNode 82 82 0

Baseline: a2f0609d3faf11564047430f0c0bfd00fc6d885b · Candidate: 35b30ef0ad255668cc5fc0fc49288a661982eb7c

Workflow run · this comment is updated on every push.

@basiav basiav changed the title fFeat/rnaa 243 pannernodeff Feat/rnaa 243 pannernode Aug 13, 2026
@mdydek mdydek added the feature New user-facing features or major capabilities label Aug 14, 2026

@mdydek mdydek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

run wpt tests for panner node and try to bring the pass rate as high as you can

Comment thread .claude/skills/web-audio-api/SKILL.md
Comment thread packages/audiodocs/docs/effects/panner-node.mdx Outdated
Comment thread packages/audiodocs/docs/other/web-audio-api-coverage.mdx Outdated
Comment thread packages/audiodocs/docs/other/web-audio-api-coverage.mdx Outdated
Comment thread packages/react-native-audio-api/common/cpp/audioapi/core/AudioListener.h Outdated
@closetcaiman closetcaiman added the web-api-spec Implementations, updates, or parity alignment with the W3C Web Audio API specification label Aug 21, 2026
@basiav
basiav requested a review from closetcaiman September 3, 2026 09:12
@basiav
basiav force-pushed the feat/rnaa-243-pannernode branch from 7e307af to 5d20310 Compare September 3, 2026 10:05
@basiav
basiav requested a review from mdydek September 8, 2026 07:20
Comment thread packages/audiodocs/docs/effects/panner-node.mdx Outdated
Comment thread packages/audiodocs/docs/other/web-audio-api-coverage.mdx Outdated
Comment thread packages/react-native-audio-api/common/cpp/audioapi/core/effects/PannerNode.cpp Outdated
Comment thread packages/react-native-audio-api/common/cpp/audioapi/core/AudioParam.cpp Outdated
Comment thread packages/react-native-audio-api/common/cpp/audioapi/core/AudioParam.cpp Outdated
@github-actions github-actions Bot added the conflicts This PR has conflicts with the base branch. label Sep 14, 2026
@basiav

basiav commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator Author

Since we do not have HRTF model yet, should we remove HRTF from
enum class PanningModelType : std::uint8_t { EqualPower, HRTF };
or shall we keep it and keep throwing unimplemented errors?

@github-actions github-actions Bot removed the conflicts This PR has conflicts with the base branch. label Sep 15, 2026
Comment thread packages/react-native-audio-api/src/core/PannerNode.ts
Comment thread packages/react-native-audio-api/src/core/PannerNode.ts
@basiav
basiav requested a review from mdydek September 17, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New user-facing features or major capabilities web-api-spec Implementations, updates, or parity alignment with the W3C Web Audio API specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants