Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit b2ee97e

Browse files
committed
bump libcsound, fix playCSD yet again, bump csound-wasm to minor version 6
1 parent 2850c9b commit b2ee97e

File tree

9 files changed

+3253
-1385
lines changed

9 files changed

+3253
-1385
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Download the latest `csound-wasm-browser.js` under [releases](https://github.com
6666
```
6767
Or alternatively (preferably for development) refer directly to the gihub releases within the html, like so.
6868
```html
69-
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-4/csound-wasm-browser.js"></script>
69+
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-5/csound-wasm-browser.js"></script>
7070
```
7171
This file is minified via Google Closure Compiler and is intended to be used as is. If you're useing Webpack or Gulp, then add this file as a vendor resource.
7272

@@ -86,7 +86,7 @@ require('csound-wasm/release/browser/csound-wasm-browser.js');
8686
<h5>Click Start realtime once, gotta love chrome's new autoplay ban policy</h5>
8787
<button id="start">Start realtime</button>
8888
<button id="beeper">Make beep!</button>
89-
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-4/csound-wasm-browser.js">
89+
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-5/csound-wasm-browser.js">
9090
</script>
9191
<script>
9292
const beeper = `

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csound-wasm",
3-
"version": "6.12.0-5",
3+
"version": "6.12.0-6",
44
"author": "Hlödver Sigurdsson <[email protected]>",
55
"license": "GPL-3.0",
66
"keywords": [
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"bufferutil": "^4.0.0",
29-
"libcsound": "^6.12.0-0",
29+
"libcsound": "^6.12.0-1",
3030
"midi": "^0.9.5",
3131
"speaker": "^0.4.1",
3232
"strip-ansi": "^5.0.0",

release/browser/csound-wasm-browser.js

Lines changed: 1603 additions & 667 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/browser/csound-wasm-worklet-processor.js

Lines changed: 1615 additions & 680 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/browser/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/node/index.js

Lines changed: 13 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/node/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/csound_wasm/browser.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
(if (exists? ^js js/window.csound_worklet_processor_url)
143143
^js js/window.csound_worklet_processor_url
144144
(str "https://s3.amazonaws.com/hlolli/csound-wasm/"
145-
"6.12.0-5"
145+
"6.12.0-6"
146146
"/csound-wasm-worklet-processor.js")))
147147
(.then
148148
(fn []

src/csound_wasm/core.cljs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@
229229
fs root-dir (.-name file)
230230
(.-result file-reader)
231231
true true))]
232-
(prn "INCLUDES?" (.readdir fs root-dir)
233-
(.includes (.readdir fs root-dir) (.-name file)))
234232
(when (.includes (.readdir fs root-dir) (.-name file))
235233
(.unlink fs (str root-dir "/" (.-name file))))
236234
(set! (.-onload file-reader) file-ready-event)
@@ -479,21 +477,21 @@
479477
{:keys [nchnls nchnls_i zerodbfs sr ksmps buffer]}
480478
config-clj]
481479
(reset! audio-config config-clj)
482-
(if-let [awn @audio-worklet-node]
483-
((:post awn) #js ["setStartupFn" "playCSD" csd config-js])
484-
(if @wasm-loaded?
485-
(if-not @audio-started?
486-
(do (reset! audio-config config-clj)
487-
(reset-sequence config-clj)
488-
(compile-csd csd)
489-
(@start-audio-fn config-clj))
490-
(do (reset)
491-
(prepareRT) ;; this prevents cannot open idac errors
492-
(reset-sequence config-clj)
493-
(compile-csd csd)
494-
(@start-audio-fn config-clj)))
495-
(do
496-
(swap! event-queue conj #(play-csd csd config-js)))))))
480+
(when-let [awn @audio-worklet-node]
481+
((:post awn) #js ["setStartupFn" "playCSD" csd config-js]))
482+
(if (and @wasm-loaded? (not @audio-worklet-node))
483+
(if-not @audio-started?
484+
(do (reset! audio-config config-clj)
485+
(reset-sequence config-clj)
486+
(compile-csd csd)
487+
(@start-audio-fn config-clj))
488+
(do (reset)
489+
(prepareRT) ;; this prevents cannot open idac errors
490+
(reset-sequence config-clj)
491+
(compile-csd csd)
492+
(@start-audio-fn config-clj)))
493+
(do
494+
(swap! event-queue conj #(play-csd csd config-js))))))
497495

498496
(defn start-realtime [& [config]]
499497
(let [config (merge @audio-config

0 commit comments

Comments
 (0)