Web Audio API

Web audio concepts and usage

1.创建audio context
2.在context中创建source,例如, OscillatorNode, sound/video files(AudioBufferSourceNode, MediaElementAudioSourceNode), audio stream(MediaStreamAudioSourceNode)
3.在context中创建effects nodes, 例如reverb, biquad filter, panner, compressor
4.选择destination, 例如系统的音响, 耳机
5.连接sources到effects,再到destination

Web Audio API_第1张图片

Web Audio API Interfaces

1.General audio graph definition

AudioContext|BaseAudioContext|AudioContextOptions
AudioNode
AudioParam|AudioParamMap|ended event

2.Defining audio sources

AudioScheduledSourceNode|OscillatorNode|

AudioBuffer|AudioBufferSourceNode
MediaElementAudioSourceNode
MediaStreamAudioSourceNode|MediaStreamTrackAudioSourceNode

3.Defining audio effects filters

BiquadFilterNode
ConvolverNode
DelayNode
DynamicsCompressorNode
GainNode
WaveShaperNode
PeriodicWave
IIRFilterNode

4.Defining audio destinations

AudioDestinationNode
MediaStreamAudioDestinationNode

5.Data analysis and visualization

AnalyserNode

6.Splitting and merging audio channels

ChannelMergerNode
ChannelSplitterNode

7.Audio spatialization

AudioListener
PannerNode
StereoPannerNode

8.Audio processing in JavaScript

AudioWorklet
AudioWorkletNode
AudioWorkletProcessor
AudioWorkletGlobalScope

ScriptProcessorNode
audioprocess
AudioProcessingEvent

9.Offline/background audio processing

OfflineAudioContext
complete (event)
OfflineAudioCompletionEvent

参考:
https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#Audio_Workers

你可能感兴趣的:(js)