Skip to content

Commit 5c89c99

Browse files
committed
BaseSound.config now contains all defaults. Fix phaserjs#3525
1 parent 5f9972c commit 5c89c99

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/sound/BaseSound.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,15 @@ var BaseSound = new Class({
120120
* @since 3.0.0
121121
*/
122122
this.config = {
123-
/**
124-
* Initializing delay config setting
125-
*/
123+
124+
mute: false,
125+
volume: 1,
126+
rate: 1,
127+
detune: 0,
128+
seek: 0,
129+
loop: false,
126130
delay: 0
131+
127132
};
128133

129134
/**

src/sound/webaudio/WebAudioSound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ var WebAudioSound = new Class({
541541

542542
var now = this.manager.context.currentTime;
543543

544-
if (this.source)
544+
if (this.source && typeof this.totalRate === 'number')
545545
{
546546
this.source.playbackRate.setValueAtTime(this.totalRate, now);
547547
}

0 commit comments

Comments
 (0)