Skip to content

Commit e36e189

Browse files
Dispatching loop event when sound loops
1 parent 0ac51b8 commit e36e189

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var Class = require('../../utils/Class');
22
var BaseSound = require('../BaseSound');
3+
var SoundEvent = require('../SoundEvent');
34
// Phaser.Sound.WebAudioSound
45
// TODO support webkitAudioContext implementation differences
56
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext
@@ -252,6 +253,7 @@ var WebAudioSound = new Class({
252253
rate: this.totalRate
253254
});
254255
this.createAndStartLoopBufferSource();
256+
this.events.dispatch(new SoundEvent(this, 'SOUND_LOOP'));
255257
}
256258
},
257259
destroy: function () {

0 commit comments

Comments
 (0)