Skip to content

Commit e2924a5

Browse files
author
Raed Atoui
committed
upgrade tone and deal with suspended context until interaction
1 parent 7972518 commit e2924a5

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"stylelint-config-standard": "^18.2.0",
2222
"stylelint-config-styled-components": "^0.1.1",
2323
"stylelint-processor-styled-components": "^1.3.1",
24-
"tone": "^0.11.11"
24+
"tone": "^13.1.6"
2525
},
2626
"devDependencies": {
2727
"babel-core": "^6.26.0",
@@ -88,7 +88,7 @@
8888
"unit-test": "jest",
8989
"fmt": "prettier --write \"src/**/*.js\"",
9090
"stylelint": "stylelint src/**/*.js",
91-
"typecheck": "./node_modules/.bin/flow"
91+
"typecheck": "./node_modules/.bin/flow"
9292
},
9393
"jest": {
9494
"setupFiles": [

src/components/Work/Nervous.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ class Nervous {
137137
play(note: string): void {
138138
// this.synth.triggerRelease(this.currentNote);
139139
// this.currentNote = note;
140+
if (this.synth.context && this.synth.context.state !== "running")
141+
this.synth.context.resume();
140142
this.synth.triggerAttackRelease(note, 0.5, undefined, 0.5);
141143
}
142144

yarn.lock

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@ [email protected], debug@^3.0.0, debug@^3.1.0:
22652265
dependencies:
22662266
ms "2.0.0"
22672267

2268-
debuglog@*, debuglog@^1.0.1:
2268+
debuglog@^1.0.1:
22692269
version "1.0.1"
22702270
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
22712271

@@ -4085,7 +4085,7 @@ import-local@^1.0.0:
40854085
pkg-dir "^2.0.0"
40864086
resolve-cwd "^2.0.0"
40874087

4088-
imurmurhash@*, imurmurhash@^0.1.4:
4088+
imurmurhash@^0.1.4:
40894089
version "0.1.4"
40904090
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
40914091

@@ -5350,10 +5350,6 @@ lodash-es@^4.17.5, lodash-es@^4.2.1:
53505350
version "4.17.8"
53515351
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.8.tgz#6fa8c8c5d337481df0bdf1c0d899d42473121e45"
53525352

5353-
lodash._baseindexof@*:
5354-
version "3.1.0"
5355-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
5356-
53575353
lodash._baseisequal@^3.0.0:
53585354
version "3.0.7"
53595355
resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1"
@@ -5369,25 +5365,15 @@ lodash._baseuniq@~4.6.0:
53695365
lodash._createset "~4.0.0"
53705366
lodash._root "~3.0.0"
53715367

5372-
lodash._bindcallback@*, lodash._bindcallback@^3.0.0:
5368+
lodash._bindcallback@^3.0.0:
53735369
version "3.0.1"
53745370
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
53755371

5376-
lodash._cacheindexof@*:
5377-
version "3.0.2"
5378-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
5379-
5380-
lodash._createcache@*:
5381-
version "3.1.2"
5382-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
5383-
dependencies:
5384-
lodash._getnative "^3.0.0"
5385-
53865372
lodash._createset@~4.0.0:
53875373
version "4.0.3"
53885374
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
53895375

5390-
lodash._getnative@*, lodash._getnative@^3.0.0:
5376+
lodash._getnative@^3.0.0:
53915377
version "3.9.1"
53925378
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
53935379

@@ -5434,10 +5420,6 @@ lodash.keys@^3.0.0:
54345420
lodash.isarguments "^3.0.0"
54355421
lodash.isarray "^3.0.0"
54365422

5437-
lodash.restparam@*:
5438-
version "3.6.1"
5439-
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
5440-
54415423
lodash.sortby@^4.7.0:
54425424
version "4.7.0"
54435425
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@@ -7400,7 +7382,7 @@ readable-stream@~2.1.5:
74007382
string_decoder "~0.10.x"
74017383
util-deprecate "~1.0.1"
74027384

7403-
readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
7385+
readdir-scoped-modules@^1.0.0:
74047386
version "1.0.2"
74057387
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
74067388
dependencies:
@@ -8709,9 +8691,9 @@ to-regex@^3.0.1, to-regex@^3.0.2:
87098691
regex-not "^1.0.2"
87108692
safe-regex "^1.1.0"
87118693

8712-
tone@^0.11.11:
8713-
version "0.11.11"
8714-
resolved "https://registry.yarnpkg.com/tone/-/tone-0.11.11.tgz#7af8521eba6df84a910d457485a13705f8c824e5"
8694+
tone@^13.1.6:
8695+
version "13.1.6"
8696+
resolved "https://registry.yarnpkg.com/tone/-/tone-13.1.6.tgz#110e4a04607d59e7ebf6c0679d67e7caf687e347"
87158697

87168698
tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3:
87178699
version "2.3.4"
@@ -9083,7 +9065,7 @@ v8-compile-cache@^1.1.2:
90839065
version "1.1.2"
90849066
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz#8d32e4f16974654657e676e0e467a348e89b0dc4"
90859067

9086-
validate-npm-package-license@*, validate-npm-package-license@^3.0.1:
9068+
validate-npm-package-license@^3.0.1:
90879069
version "3.0.3"
90889070
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338"
90899071
dependencies:

0 commit comments

Comments
 (0)