summaryrefslogtreecommitdiff
path: root/client/lib
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-02-21 14:50:40 +0100
committerJules Laplace <julescarbon@gmail.com>2018-02-21 14:50:40 +0100
commitc31108b27156d2d1f2c50b57179828da9725f615 (patch)
tree8be278ccb05a47d3c8fc68eb634425aa7056647b /client/lib
parent486d1d22f64fb930bd15707ffbde10a68f37ea7d (diff)
loading
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/sampler.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/lib/sampler.js b/client/lib/sampler.js
index a0f4dfd..c1faa7e 100644
--- a/client/lib/sampler.js
+++ b/client/lib/sampler.js
@@ -49,7 +49,11 @@ export default class Sampler {
time = time || Tone.now()
player.playbackRate = freq / best.sample.root
- player.start(time)
+ if (player.loaded) {
+ player.start(time)
+ } else {
+ console.log('loading')
+ }
return player
}
}