Skip to content

update web audio API methods createDelay and createGain #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/ThreeAudio-tquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ ThreeAudio.Source.prototype = {
};

// Create audible/inaudible inputs for analysis
this.audible = c.createDelayNode();
this.inaudible = c.createDelayNode();
this.audible = c.createDelay();
this.inaudible = c.createDelay();

// Wait for audio metadata before initializing analyzer
if (this.element.readyState >= 3) {
Expand Down Expand Up @@ -864,18 +864,18 @@ ThreeAudio.Source.prototype = {
filter.analyser.fftSize = fftSize;

// Create delay node to compensate for FFT lag.
filter.delayNode = c.createDelayNode();
filter.delayNode = c.createDelay();
filter.delayNode.delayTime.value = 0;

// Create gain node to offset filter loss.
filter.gainNode = c.createGainNode();
filter.gainNode = c.createGain();
filter.gainNode.gain.value = spec.gain;

filters[key] = filter;
});

// Create playback delay to compensate for FFT lag.
this.delay = c.createDelayNode();
this.delay = c.createDelay();
this.processingDelay = this.fftSize * 2 / c.sampleRate;
this.delay.delayTime.value = this.processingDelay;

Expand Down
Loading