Skip to content

Commit 35f711e

Browse files
committed
introduced Gemfile, rvmrc, updated soundbridge
1 parent 93fcd7f commit 35f711e

File tree

6 files changed

+45
-10
lines changed

6 files changed

+45
-10
lines changed

.rvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rvm 1.9.2@webloop --create

Gemfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
source "http://rubygems.org"
2+
3+
gem "sinatra"
4+
gem "json"
5+
gem "haml"
6+
gem "mongo"
7+
gem "bson_ext"
8+
gem "RedCloth"
9+
10+
11+

Gemfile.lock

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
GEM
2+
remote: http://rubygems.org/
3+
specs:
4+
RedCloth (4.2.7)
5+
bson (1.3.1)
6+
bson_ext (1.3.1)
7+
haml (3.1.2)
8+
json (1.5.3)
9+
mongo (1.3.1)
10+
bson (>= 1.3.1)
11+
rack (1.3.2)
12+
sinatra (1.2.6)
13+
rack (~> 1.1)
14+
tilt (>= 1.2.2, < 2.0)
15+
tilt (1.3.2)
16+
17+
PLATFORMS
18+
ruby
19+
20+
DEPENDENCIES
21+
RedCloth
22+
bson_ext
23+
haml
24+
json
25+
mongo
26+
sinatra

app.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'rubygems'
2+
require 'bundler/setup'
23
require 'sinatra'
34
require 'yaml'
45
require 'json'

public/javascripts/webloop-player.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,25 +279,21 @@ var sequencer = function() {
279279

280280
$(function() {
281281
var seq = sequencer();
282-
soundbridge = SoundBridge(2, 44100, '/soundbridge');
283-
window.setTimeout(function() {
284-
285-
286-
soundbridge.setCallback(seq.update);
282+
SoundBridge(2, 44100, '/soundbridge', function(bridge) {
283+
bridge.setCallback(seq.update);
287284
var playing = false;
288285
$('#playButton').click(function(e) {
289286
if (playing) {
290-
soundbridge.stop();
287+
bridge.stop();
291288
$(this).html("play");
292289
playing = false;
293290
} else {
294-
soundbridge.play();
291+
bridge.play();
295292
$(this).html("stop");
296293
playing = true;
297294
}
298295
return false;
299296
});
300-
}, 1000);
301-
297+
});
302298

303299
});

0 commit comments

Comments
 (0)