File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,9 +49,16 @@ var WebAudioSoundManager = new Class({
4949 BaseSoundManager . call ( this , game ) ;
5050 } ,
5151 /**
52+ * Method responsible for instantiating and returning AudioContext instance.
53+ * If an instance of an AudioContext class was provided trough the game config,
54+ * that instance will be returned instead. This can come in handy if you are reloading
55+ * a Phaser game on a page that never properly refreshes (such as in an SPA project)
56+ * and you want to reuse already instantiated AudioContext.
57+ *
5258 * @private
53- * @param game
54- * @returns {AudioContext }
59+ * @method Phaser.Sound.WebAudioSoundManager#createAudioContext
60+ * @param {Phaser.Game } game - Reference to the current game instance.
61+ * @returns {AudioContext } The AudioContext instance to be used for playback.
5562 */
5663 createAudioContext : function ( game ) {
5764 var audioConfig = game . config . audio ;
You can’t perform that action at this time.
0 commit comments