1.0.0 • Published 10 years ago
duolet.bundle v1.0.0
duolet.bundle
All components in the main thread. This architecture works on the browser and the Node.js
Installation
$ npm install duolet.bundleExample
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: duoletDSPdriver: pico.driversampleRate: number(implicit readonly)bufferLength: number(implicit readonly)
Instance methods
compose(spec: object): selfsetup(opts: object): selfstart(): selfstop(): selfsendToServer(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
