Skip to content

Instantly share code, notes, and snippets.

@3846masa
Created November 15, 2015 04:32
Show Gist options
  • Save 3846masa/3ce151c89a97b3bada36 to your computer and use it in GitHub Desktop.
Save 3846masa/3ce151c89a97b3bada36 to your computer and use it in GitHub Desktop.
RPGツクールMVのサンプルのバグを直す魔法
WebAudio.prototype._createNodes = function() {
var context = WebAudio._context;
this._sourceNode = context.createBufferSource();
this._sourceNode.buffer = this._buffer;
this._sourceNode.loopStart = this._loopStart;
this._sourceNode.loopEnd = this._loopStart + this._loopLength;
this._sourceNode.playbackRate.value = this._pitch;
this._gainNode = context.createGain();
this._gainNode.gain.value = isFinite(this._volume) ? this._volume : 0;
this._pannerNode = context.createPanner();
this._pannerNode.panningModel = 'equalpower';
this._updatePanner();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment