Skip to content

Commit 6747770

Browse files
Ditching loopSource approach as logic would be too complicated when taking playback rate into account
1 parent 47522af commit 6747770

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ var WebAudioSound = new Class({
2525
* @property {AudioBufferSourceNode} source
2626
*/
2727
this.source = null;
28-
/**
29-
* [description]
30-
*
31-
* @private
32-
* @property {AudioBufferSourceNode} loopSource
33-
*/
34-
this.loopSource = null;
3528
/**
3629
* [description]
3730
*
@@ -142,15 +135,6 @@ var WebAudioSound = new Class({
142135
this.source.start(0, Math.max(0, offset), Math.max(0, duration));
143136
this.resetConfig();
144137
},
145-
/**
146-
* @private
147-
*/
148-
createAndStartLoopBufferSource: function () {
149-
this.loopSource = this.createBufferSource();
150-
var offset = this.currentMarker ? this.currentMarker.start : 0;
151-
var duration = this.duration;
152-
this.loopSource.start(Math.max(0, this.startTime + duration), Math.max(0, offset), Math.max(0, duration));
153-
},
154138
/**
155139
* Used internally to do what the name says.
156140
*
@@ -161,10 +145,6 @@ var WebAudioSound = new Class({
161145
this.source.stop();
162146
this.source = null;
163147
}
164-
if (this.loopSource) {
165-
this.source.stop();
166-
this.source = null;
167-
}
168148
this.startTime = 0;
169149
},
170150
/**
@@ -208,9 +188,6 @@ var WebAudioSound = new Class({
208188
if (this.source) {
209189
this.source.playbackRate.setValueAtTime(this.totalRate, 0);
210190
}
211-
if (this.loopSource) {
212-
this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0);
213-
}
214191
if (this.isPlaying) {
215192
this.rateUpdates.push({
216193
time: this.manager.context.currentTime - this.startTime,

0 commit comments

Comments
 (0)