Skip to content

Commit b295077

Browse files
Applying config right before calling start on buffer source
1 parent 7bde818 commit b295077

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ var WebAudioSound = new Class({
130130
this.source = this.manager.context.createBufferSource();
131131
this.source.buffer = this.audioBuffer;
132132
this.source.connect(this.muteNode);
133-
this.applyConfig();
134133
this.source.onended = function (ev) {
135134
if (ev.target === this.source) {
136135
// sound ended
137136
this.hasEnded = true;
138137
}
139138
// else was stopped
140139
}.bind(this);
140+
this.applyConfig();
141141
this.source.start(0, Math.max(0, offset), Math.max(0, duration));
142142
},
143143
/**

0 commit comments

Comments
 (0)