RecorderAdapterNode
The RecorderAdapterNode
is an AudioNode
which is an adapter for AudioRecorder
.
It lets you compose audio input from recorder into an audio graph.
Constructor
BaseAudioContext.createRecorderAdapter()
Example
const recorder = new AudioRecorder({
sampleRate: 48000,
bufferLengthInSamples: 48000,
});
const audioContext = new AudioContext({ sampleRate: 48000 });
const recorderAdapterNode = aCtxRef.current.createRecorderAdapter();
recorder.connect(recorderAdapterNode);
recorderAdapterNode.connect(audioContext.destination)
Properties
RecorderAdapterNode
does not define any additional properties.
It inherits all properties from AudioNode
.
Methods
RecorderAdapterNode
does not define any additional methods.
It inherits all methods from AudioNode
.
Remarks
- Adapter without a connected recorder will produce silence.
- Adapter connected only to a recorder will function correctly and keep a small buffer of recorded data.
- Adapter will not be garbage collected as long as it remains connected to either a destination or a recorder.