Chapter 8: HTML5 Audio API - Examples
Note: samples 1-13 only work in Firefox 4+, while sample 14-16 need a custom build of Safari
- Listing 8-1: Reading audio samples from an audio element
- Listing 8-2: Reading audio samples from a video element
- Listing 8-3: Reading audio metadata for the audio framebuffer audio/video
- Listing 8-4: Reading the event time for the audio framebuffer audio/video
- Listing 8-5: Rendering the audio samples in a waveform
- Listing 8-6: Rendering the audio samples in a waveform with history
- Listing 8-7: Rendering the audio samples in a spectrum
- Listing 8-8: Creating a new audio element with a sine wave paint every 512th sample/paint every sample
- Listing 8-9: Creating a new audio element from existing one just sound/with canvas
- Listing 8-10: Displaying latency between playback on original audio element and scripted audio original/optimized
- Listing 8-11: Playing back all the samples from an input source just sound/with canvas
- Listing 8-12: Bleeping out a section of audio with a sine wave just sound/with canvas
- Listing 8-13: A Web-based tone generator just sound/with canvas
- Listing 8-14: Reading and writing sound using an AudioContext
- Listing 8-15: Creating a reverberation effect using the AudioContext convolution filter
- Listing 8-16: Rendering waveform data from an AudioContext filter graph