Skip to content
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

feat: add legacy decodeAudioData signature #60

Merged
merged 4 commits into from
Dec 29, 2023

Conversation

b-ma
Copy link
Collaborator

@b-ma b-ma commented Dec 28, 2023

First step regarding #57

"get rid of the wpt fork (how to deal with webaudio/resources/buffer-loader.js)"

@b-ma
Copy link
Collaborator Author

b-ma commented Dec 28, 2023

Ok, I just added a mock for the XMLHttpRequest in .scripts/wpt-mock/, should allow to fix the second step.

You can test it by running:

node ./.scripts/wpt-mock/wpt-buffer-loader.js

@b-ma b-ma force-pushed the feature/legacy-decode-audio-data branch from 3207194 to 3fe7daa Compare December 28, 2023 18:30
@orottier
Copy link
Collaborator

Hah pretty cool. To be fair I had not noticed yet that we need this machinery.

The issue I was referring to was the problem that we need a cp wpt/webaudio/js/buffer-loader.js wpt/webaudio/resources in order for the wpt-runner to not crash. That is still something to be addressed (probably by rebuilding the statis assets of the wpt-runner repo - I need to look into this further).

The cool thing is that you now have probably solved some failed tests because of the missing XMLHttpRequest :)

@orottier
Copy link
Collaborator

@b-ma
Copy link
Collaborator Author

b-ma commented Dec 29, 2023

Hum weird indeed... This looks like an issue in the wpt repo indeed, the path in another file is right https://github.com/web-platform-tests/wpt/blob/0c8c0662ed5d444bf12992e433502e8b6af640d4/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html#L20

And in the file you pointed to, the BufferLoader is not even used... I guess in a browser it just triggers a 404 error with no harm, so they didn't noticed

As a temporary solution, we could just copy the file in the resources directory using npm scripts (should be very simple) and ignore changes in the wpt submodule (e.g. https://medium.com/@maryam.ghani160/how-to-ignore-changes-in-git-submodules-a3ea1463bdde), what do you think?

@b-ma b-ma merged commit 5e20023 into main Dec 29, 2023
5 checks passed
@b-ma b-ma deleted the feature/legacy-decode-audio-data branch December 29, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants