Skip to content

Commit 7b2ed7f

Browse files
Using EventEmitter emit method to dispatch rate update event
1 parent 4be42c3 commit 7b2ed7f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/sound/BaseSound.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ var NOOP = require('../utils/NOOP');
66
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
77
*/
88
var BaseSound = new Class({
9-
109
Extends: EventEmitter,
11-
1210
/**
1311
* @class Phaser.Sound.BaseSound
1412
* @constructor
@@ -17,9 +15,7 @@ var BaseSound = new Class({
1715
* @param {ISoundConfig} [config] - An optional config object containing default sound settings.
1816
*/
1917
initialize: function BaseSound(manager, key, config) {
20-
2118
EventEmitter.call(this);
22-
2319
/**
2420
* Local reference to the sound manager.
2521
*
@@ -413,7 +409,7 @@ Object.defineProperty(BaseSound.prototype, 'rate', {
413409
set: function (value) {
414410
this.currentConfig.rate = value;
415411
this.setRate();
416-
this.events.dispatch(new SoundValueEvent(this, 'SOUND_RATE', value));
412+
this.emit('rate', this, value);
417413
}
418414
});
419415
/**

0 commit comments

Comments
 (0)