README
duolet.bundle
All components in the main thread. This architecture works on the browser and the Node.js
Installation
$ npm install duolet.bundle
Example
in the main thread
const duolet = require("duolet.bundle")();
const Driver = require("pico.driver.webaudio");
const DSP = require("./dsp");
let audioContext = new AudioContext();
duolet.compose({ dsp: new DSP(), driver: new Driver() });
duolet.setup({ context: audioContext, bufferLength: 1024 });
duolet.start();
API
Duolet
constructor()
Instance attributes
dsp: duoletDSP
driver: pico.driver
sampleRate: number
(implicit readonly)bufferLength: number
(implicit readonly)
Instance methods
compose(spec: object): self
setup(opts: object): self
start(): self
stop(): self
sendToServer(data: any): void
Interfaces
interface duoletDSP {
optional setup(opts: object) => void;
optional start() => void;
optional stop() => void;
process(bufL: Float32Array, bufR: Float32Array) => void;
}
Audio Drivers
License
MIT