Only connect the analyser once.

This commit is contained in:
Jordan Eldredge 2017-09-24 15:00:14 -07:00
parent 5a60527e66
commit 4445af4bc5

View file

@ -112,6 +112,7 @@ export default class Media {
this._rightGain.connect(this._chanMerge, 0, 1);
this._chanMerge.connect(this._gainNode);
this._chanMerge.connect(this._analyser);
this._gainNode.connect(this._context.destination);
@ -183,7 +184,6 @@ export default class Media {
this._source = this._context.createBufferSource();
this._source.buffer = this._buffer;
this._source.connect(this._preamp);
this._chanMerge.connect(this._analyser);
this._position =
typeof position !== "undefined" ? position : this._position;