New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AudioListener/AudioPanner DOM interfaces #21502

Merged
merged 12 commits into from Aug 25, 2018

Conversation

Projects
5 participants
@Manishearth
Member

Manishearth commented Aug 23, 2018

Seems to work.

I'll need some changes to the servo-media side to support the panner
node getters as well as the older setPosition()/etc APIs. I'll get to
those later.

r? @ferjm


This change is Reviewable

@highfive

This comment has been minimized.

highfive commented Aug 23, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/mod.rs, components/script/dom/audioscheduledsourcenode.rs, components/script/dom/audiodestinationnode.rs, components/script/dom/audionode.rs, components/script/dom/webidls/AudioListener.webidl and 5 more
  • @KiChjang: components/script/dom/mod.rs, components/script/dom/audioscheduledsourcenode.rs, components/script/dom/audiodestinationnode.rs, components/script/dom/audionode.rs, components/script/dom/webidls/AudioListener.webidl and 5 more
@highfive

This comment has been minimized.

highfive commented Aug 23, 2018

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@Manishearth Manishearth force-pushed the Manishearth:listener branch 2 times, most recently from 35b8104 to 9a52aac Aug 23, 2018

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 23, 2018

Tested, the following example works:

<script type="text/javascript">
let ctx = new AudioContext();
let osc = ctx.createOscillator();
let panner = new PannerNode(ctx, {"coneOuterAngle": 0, "positionX": 100, "positionY": 0, "positionZ": 100, "refDistance": 100, "rolloffFactor": 0.01});
osc.connect(panner);
panner.connect(ctx.destination);
osc.start();
panner.positionX.linearRampToValueAtTime(-100, 0.2);
panner.positionX.linearRampToValueAtTime(100, 0.2);
panner.positionX.linearRampToValueAtTime(-100, 0.4);
panner.positionX.linearRampToValueAtTime(-100, 0.4);
panner.positionX.linearRampToValueAtTime(100, 0.6);
panner.positionX.linearRampToValueAtTime(-100, 0.6);
panner.positionX.linearRampToValueAtTime(100, 0.8);
panner.positionX.linearRampToValueAtTime(100, 0.8);
panner.positionX.linearRampToValueAtTime(-100, 1.0);
panner.positionX.linearRampToValueAtTime(100, 1.0);
panner.positionX.linearRampToValueAtTime(-100, 1.2);
panner.positionX.linearRampToValueAtTime(-100, 1.2);
panner.positionX.linearRampToValueAtTime(100, 1.4);
panner.positionX.linearRampToValueAtTime(-100, 1.4);
panner.positionX.linearRampToValueAtTime(100, 1.6);
panner.positionX.linearRampToValueAtTime(100, 1.6);
</script>

(should I check this in to tests/html?)

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 23, 2018

@bors-servo try=wpt

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 23, 2018

⌛️ Trying commit c62216d with merge 3dd46ec...

bors-servo added a commit that referenced this pull request Aug 23, 2018

Auto merge of #21502 - Manishearth:listener, r=<try>
Add AudioListener/AudioPanner DOM interfaces

Seems to work.

I'll need some changes to the servo-media side to support the panner
node getters as well as the older `setPosition()`/etc APIs. I'll get to
those later.

r? @ferjm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21502)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 23, 2018

💔 Test failed - linux-rel-css

@ferjm

Looks good!

We need to add the channelCount and channelCountMode constraints for PannerNode.

Likewise, even though we do not support HRTF yet, we should also add the autiomationRate constraints for PannerNode and AudioListener AudioParams.

Thanks!

window,
context,
node,
ParamType::Position(ParamDir::Y),

This comment has been minimized.

@ferjm

ferjm Aug 24, 2018

Member

This should be ParamDir::Z

window,
context,
node,
ParamType::Forward(ParamDir::Y),

This comment has been minimized.

@ferjm

ferjm Aug 24, 2018

Member

ParamDir::Z

window,
context,
node,
ParamType::Up(ParamDir::Y),

This comment has been minimized.

@ferjm

ferjm Aug 24, 2018

Member

ParamDir::Z

@@ -297,6 +304,15 @@ impl BaseAudioContextMethods for BaseAudioContext {
})
}
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-destination

This comment has been minimized.

@ferjm

ferjm Aug 24, 2018

Member

Change link to https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-listener, please

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 24, 2018

We don't have autiomationrate constraints, the automationrate is simply ignored (this code already exists in the media crate)

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 24, 2018

@bors-servo try=wpt

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

⌛️ Trying commit e7ed310 with merge 7196cdf...

bors-servo added a commit that referenced this pull request Aug 24, 2018

Auto merge of #21502 - Manishearth:listener, r=<try>
Add AudioListener/AudioPanner DOM interfaces

Seems to work.

I'll need some changes to the servo-media side to support the panner
node getters as well as the older `setPosition()`/etc APIs. I'll get to
those later.

r? @ferjm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21502)
<!-- Reviewable:end -->
@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 24, 2018

This should cause a bunch of new WPT failures since previously some tests didn't fully run at all, but that's okay.

At some point we need to switch gears to WPT and whittle those down, most of them aren't much work.

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

💔 Test failed - linux-rel-css

@Manishearth Manishearth force-pushed the Manishearth:listener branch from e7ed310 to b30642a Aug 24, 2018

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 24, 2018

@bors-servo r=ferjm

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

📌 Commit 25332f0 has been approved by ferjm

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

⌛️ Testing commit 25332f0 with merge e793d94...

bors-servo added a commit that referenced this pull request Aug 24, 2018

Auto merge of #21502 - Manishearth:listener, r=ferjm
Add AudioListener/AudioPanner DOM interfaces

Seems to work.

I'll need some changes to the servo-media side to support the panner
node getters as well as the older `setPosition()`/etc APIs. I'll get to
those later.

r? @ferjm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21502)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

💔 Test failed - linux-dev

@Manishearth Manishearth force-pushed the Manishearth:listener branch from 25332f0 to 04e60e6 Aug 24, 2018

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 24, 2018

@bors-servo r=ferjm

  • needed to run update-manifest because I changed interfaces.html
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

📌 Commit 04e60e6 has been approved by ferjm

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 24, 2018

⌛️ Testing commit 04e60e6 with merge d827370...

bors-servo added a commit that referenced this pull request Aug 24, 2018

Auto merge of #21502 - Manishearth:listener, r=ferjm
Add AudioListener/AudioPanner DOM interfaces

Seems to work.

I'll need some changes to the servo-media side to support the panner
node getters as well as the older `setPosition()`/etc APIs. I'll get to
those later.

r? @ferjm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21502)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 25, 2018

💔 Test failed - mac-rel-wpt1

@Manishearth

This comment has been minimized.

Member

Manishearth commented Aug 25, 2018

@bors-servo retry

{"status": "PASS", "group": "default", "message": null, "stack": null, "subtest": "document.open should throw an InvalidStateError with XML document even when there is an active parser executing script", "test": "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.html", "line": 48140, "action": "test_result", "expected": "FAIL"}

seems intermittent, let's find out

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 25, 2018

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Aug 25, 2018

@bors-servo bors-servo merged commit 04e60e6 into servo:master Aug 25, 2018

3 of 4 checks passed

Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@bors-servo bors-servo referenced this pull request Aug 25, 2018

Merged

Fix some WebAudio WPTs #21506

3 of 3 tasks complete

@ferjm ferjm added this to Done in WebAudio Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment