Skip to content

Commit

Permalink
overtone.libs.handlers now removes the current handler when it return…
Browse files Browse the repository at this point in the history
…s :overtone/remove-handler rather than :done - update handlers to reflect this.
  • Loading branch information
samaaron committed Mar 26, 2012
1 parent 3db17db commit 833461f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/monome.clj
Expand Up @@ -47,7 +47,7 @@
(on "/n_end" (fn [msg]
(if (= id (first (:args msg)))
(mono/led-off m x y))
:done)))))
:overtone/remove-handler)))))

(def loops
[[1 0 0 0 1 0 0 0]
Expand Down
2 changes: 1 addition & 1 deletion src/overtone/sc/buffer.clj
Expand Up @@ -244,7 +244,7 @@

(snd "/b_write" (:id buf) path header samples
n-frames start-frame 0)
:done))
:overtone/remove-handler))

(defrecord BufferOutStream [id size n-channels header samples rate allocated-on-server path open?])

Expand Down
2 changes: 1 addition & 1 deletion src/overtone/sc/info.clj
Expand Up @@ -54,7 +54,7 @@
:num-audio-buses (long nab)
:num-buffers (long nb)
:num-running-synths (long nrs)})
:done))
:overtone/remove-handler))
::server-info)
(let [synth-id (snd-server-info)
res (deref! prom)]
Expand Down
8 changes: 4 additions & 4 deletions src/overtone/sc/machinery/server/comms.clj
Expand Up @@ -57,7 +57,7 @@
(fn [msg] (when (= id (first (:args msg)))
(do
(handler-fn)
:done)))
:overtone/remove-handler)))
key)

(let [res (action-fn)]
Expand Down Expand Up @@ -86,7 +86,7 @@
(fn [msg] (when (= id (first (:args msg)))
(do
(deliver prom true)
:done)))
:overtone/remove-handler)))
key)
(let [res (action-fn id)]
(deref! prom)
Expand All @@ -103,7 +103,7 @@
(fn [msg] (when (= id (first (:args msg)))
(do
(deliver prom true)
:done)))
:overtone/remove-handler)))
key)
(let [res (action-fn)]
(server-snd "/sync" id)
Expand All @@ -128,6 +128,6 @@
(when (or (nil? matcher-fn)
(matcher-fn info))
(deliver p info)
:done))
:overtone/remove-handler))
key)
p)))
2 changes: 1 addition & 1 deletion src/overtone/sc/sample.clj
Expand Up @@ -141,7 +141,7 @@
args (:args smpl)
buf (get @loaded-samples* [path args])]
(free-loaded-sample [[path args] buf])
:done))
:overtone/remove-handler))

(defn sample-player
[smpl & pargs]
Expand Down

0 comments on commit 833461f

Please sign in to comment.