Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 93fcd7f

Browse files
committed
Extracted soundbridge.js
1 parent 4f4170c commit 93fcd7f

File tree

7 files changed

+11
-207
lines changed

7 files changed

+11
-207
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "public/soundbridge"]
2+
path = public/soundbridge
3+
url = [email protected]:halfbyte/soundbridge.js

public/javascripts/webloop-player.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ var sequencer = function() {
185185

186186
//var timestamp = function() { return new Date().getTime(); };
187187

188-
that.update = function(bufferSize, bufferPos) {
188+
that.update = function(soundbridge, bufferSize, channels) {
189189
var numTracks = tracks.length;
190190
for(var i=0;i<bufferSize;i++) {
191191
var posInPattern = (absoluteBufferPos + i) % patternLengthInSamples;
@@ -265,7 +265,8 @@ var sequencer = function() {
265265
track.posInNote++;
266266
mixerValue += sound;
267267
}
268-
soundbridge.addToBuffer(mixerValue / numTracks);
268+
var mixerVol = mixerValue / numTracks;
269+
soundbridge.addToBuffer(mixerVol, mixerVol);
269270
}
270271
absoluteBufferPos += bufferSize;
271272
return;
@@ -278,9 +279,10 @@ var sequencer = function() {
278279

279280
$(function() {
280281
var seq = sequencer();
281-
282+
soundbridge = SoundBridge(2, 44100, '/soundbridge');
282283
window.setTimeout(function() {
283-
soundbridge = SoundBridge();
284+
285+
284286
soundbridge.setCallback(seq.update);
285287
var playing = false;
286288
$('#playButton').click(function(e) {
@@ -295,7 +297,7 @@ $(function() {
295297
}
296298
return false;
297299
});
298-
}, 200);
300+
}, 1000);
299301

300302

301303
});

public/soundbridge

Submodule soundbridge added at 520cd61

public/soundbridge/build.hxml

Lines changed: 0 additions & 6 deletions
This file was deleted.

public/soundbridge/soundbridge.hx

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/soundbridge/soundbridge.js

Lines changed: 0 additions & 195 deletions
This file was deleted.

public/soundbridge/soundbridge.swf

-5.44 KB
Binary file not shown.

0 commit comments

Comments
 (0)