UNPKG

react-native-audio-api

Version:

react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification

33 lines (32 loc) 790 B
"use strict"; import AudioNode from "./AudioNode.js"; export default class ConvolverNode extends AudioNode { _buffer = null; constructor(context, options) { const convolverNode = context.context.createConvolver(options || {}); super(context, convolverNode); if (options?.buffer) { this.buffer = options.buffer; } this.normalize = convolverNode.normalize; } get buffer() { return this._buffer; } set buffer(buffer) { if (!buffer) { this.node.setBuffer(null); this._buffer = null; return; } this.node.setBuffer(buffer.buffer); this._buffer = buffer; } get normalize() { return this.node.normalize; } set normalize(value) { this.node.normalize = value; } } //# sourceMappingURL=ConvolverNode.js.map