wam-extensions
Version:
Unofficial extensions to the Web Audio Module 2 API
17 lines (16 loc) • 416 B
JavaScript
export class ModulationTargetExtension {
constructor() {
this.delegates = new Map();
}
setModulationTargetDelegate(pluginId, delegate) {
if (delegate) {
this.delegates.set(pluginId, delegate);
}
else {
this.delegates.delete(pluginId);
}
}
getModulationTargetDelegate(pluginId) {
return this.delegates.get(pluginId);
}
}