Newer
Older
HuangJiPC / public / static / three / src / audio / AudioContext.js
@zhangdeliang zhangdeliang on 21 Jun 296 bytes update
let _context;

const AudioContext = {

	getContext: function () {

		if ( _context === undefined ) {

			_context = new ( window.AudioContext || window.webkitAudioContext )();

		}

		return _context;

	},

	setContext: function ( value ) {

		_context = value;

	}

};

export { AudioContext };