mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Reverting compatibility changes as they are handled by a polyfill
This commit is contained in:
parent
2d2bf4c0e3
commit
b151ba518a
1 changed files with 6 additions and 6 deletions
|
@ -38,14 +38,14 @@ var WebAudioSound = new Class({
|
|||
* @private
|
||||
* @property {GainNode} muteNode
|
||||
*/
|
||||
this.muteNode = (manager.context.createGain || manager.context.createGainNode).call(manager.context);
|
||||
this.muteNode = manager.context.createGain();
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @private
|
||||
* @property {GainNode} volumeNode
|
||||
*/
|
||||
this.volumeNode = (manager.context.createGain || manager.context.createGainNode).call(manager.context);
|
||||
this.volumeNode = manager.context.createGain();
|
||||
/**
|
||||
* The time at which the sound should have started from the beginning.
|
||||
* Based on BaseAudioContext.currentTime value.
|
||||
|
@ -158,7 +158,7 @@ var WebAudioSound = new Class({
|
|||
this.startTime = when;
|
||||
this.source = this.createBufferSource();
|
||||
this.applyConfig();
|
||||
(this.source.start || this.source.noteGrainOn).call(this.source, Math.max(0, when), Math.max(0, offset), Math.max(0, duration));
|
||||
this.source.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));
|
||||
this.resetConfig();
|
||||
},
|
||||
/**
|
||||
|
@ -173,7 +173,7 @@ var WebAudioSound = new Class({
|
|||
this.loopTime = when;
|
||||
this.loopSource = this.createBufferSource();
|
||||
this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0);
|
||||
(this.loopSource.start || this.loopSource.noteGrainOn).call(this.loopSource, Math.max(0, when), Math.max(0, offset), Math.max(0, duration));
|
||||
this.loopSource.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
@ -204,7 +204,7 @@ var WebAudioSound = new Class({
|
|||
*/
|
||||
stopAndRemoveBufferSource: function () {
|
||||
if (this.source) {
|
||||
(this.source.stop || this.source.noteOff).call(this.source);
|
||||
this.source.stop();
|
||||
this.source = null;
|
||||
}
|
||||
this.playTime = 0;
|
||||
|
@ -218,7 +218,7 @@ var WebAudioSound = new Class({
|
|||
*/
|
||||
stopAndRemoveLoopBufferSource: function () {
|
||||
if (this.loopSource) {
|
||||
(this.loopSource.stop || this.loopSource.noteOff).call(this.loopSource);
|
||||
this.loopSource.stop();
|
||||
this.loopSource = null;
|
||||
}
|
||||
this.loopTime = 0;
|
||||
|
|
Loading…
Reference in a new issue