Class: AudioInBuffer

AudioInBuffer

Slice an AudioBuffer into signal blocks and propagate the resulting frames through the graph.

Constructor

new AudioInBuffer(options)

Parameters:
Name Type Description
options Object

Override parameter' default values.

Properties
Name Type Attributes Default Description
audioBuffer AudioBuffer <optional>

Audio buffer to process.

frameSize Number <optional>
512

Size of the output blocks.

channel Number <optional>
0

Number of the channel to process.

progressCallback Number <optional>
null

Callback to be excuted on each frame output, receive as argument the current progress ratio.

Source:
Example
import * as lfo from 'waves-lfo/client';

const audioInBuffer = new lfo.source.AudioInBuffer({
  audioBuffer: audioBuffer,
  frameSize: 512,
});

const waveform = new lfo.sink.Waveform({
  canvas: '#waveform',
  duration: 1,
  color: 'steelblue',
  rms: true,
});

audioInBuffer.connect(waveform);
audioInBuffer.start();

Methods

start()

Propagate the streamParams in the graph and start propagating frames. When called, the slicing of the given audioBuffer starts immediately and each resulting frame is propagated in graph.

Source:
See:

stop()

Finalize the stream and stop the whole graph. When called, the slicing of the audioBuffer stops immediately.

Source:
See: