simplify createReverb
This commit is contained in:
parent
508af7eb72
commit
ce842f7561
2 changed files with 3 additions and 3 deletions
|
|
@ -2,12 +2,12 @@ import reverbGen from './reverbGen.mjs';
|
|||
|
||||
if (typeof AudioContext !== 'undefined') {
|
||||
AudioContext.prototype.generateReverb = reverbGen.generateReverb;
|
||||
AudioContext.prototype.createReverb = function (audioContext, duration, fade, revlp, revdim) {
|
||||
AudioContext.prototype.createReverb = function (duration, fade, revlp, revdim) {
|
||||
const convolver = this.createConvolver();
|
||||
convolver.setDuration = (d, fade, revlp, revdim) => {
|
||||
this.generateReverb(
|
||||
{
|
||||
audioContext,
|
||||
audioContext: this,
|
||||
sampleRate: 44100,
|
||||
numChannels: 2,
|
||||
decayTime: d,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue