M1900: Implement missing WebAudio node support
Background information
Major browsers support the WebAudio standard which can be used to create complex media playback applications from low-level building blocks. Servo is a new, experimental browser that supports some of these building blocks (called audio nodes); the goal of this project is to improve compatibility with web content that relies on the WebAudio API by implementing missing pieces of incomplete node types (OscillatorNode) along with entire missing nodes (ConstantSourceNode, StereoPannerNode).
Tracking issues
https://github.com/servo/servo/issues/21803 (ConstantSourceNode)
https://github.com/servo/servo/issues/21797 (StereoPannerNode)
References
- Setup for modifying the standalone media backend implementation
- Implementation of audio node processing algorithms
- Runnable examples of audio node processing algorithms
- Example pull request implementing a missing node type in Servo (another example)
- Example pull request implementing the processing backend for a missing node type
- Setup for making changes to Servo's code
- Documentation for introducing new WebIDL-based DOM interfaces to Servo
- Documentation for integrating a version of servo-media that contains your local changes into your local Servo build
Initial steps
- email the mozilla.dev.servo mailing list (be sure to subscribe to it first!) introducing your group and asking any necessary questions
- create the DOM interface for ConstantSourceNode and implement the createConstantSource API for BaseAudioContext
- connect the DOM interface to the underlying backend node by processing the unimplemented message type.
- update the expected test results for the relevant tests
Subsequent steps
- implement a audio node message that is specific to OscillatorNode (use BiquadFilterNode as a model) which updates the node's oscillator type
- implement the type attribute setter for the OscillatorNode interface which uses the new oscillator node message
- implement the backend for StereoPannerNode in the media crate by creating a new node implementation using PannerNode as a guide. The processing algorithm is described in the specification. Create a runnable example based on the example for PannerNode.
- create the DOM interface for StereoPannerNode and implement the createStereoPannerNode API for BaseAudioContext