Skip to content

WebAudio nodes student project

Fernando Jiménez Moreno edited this page Nov 29, 2018 · 4 revisions

Implement support for several missing WebAudio node types

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, IIRFilterNode).

Tracking issue: (please ask questions in these issues)

Useful 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 a new example program for the media crate that exercises the different oscillator types. There will be no difference in sound yet.
  • implement the processing algorithm for the different oscillator types so that the example program sounds correct.
  • implement the missing ConstantSource node type in a new constant_source.rs file that produces a constant tone based a stored value that can be modified (use the GainNode implementation as a model)
  • 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.

Subsequent steps:

  • 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
  • create the DOM interface for IIRFilterNode and implement the createIIRFilterNode API for BaseAudioContext.
  • implement the backend for IIRFilterNode based on the specification's processing model and create a runnable example.
Clone this wiki locally