summaryrefslogtreecommitdiff
path: root/src/unheard/midi.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/unheard/midi.clj')
-rw-r--r--src/unheard/midi.clj31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/unheard/midi.clj b/src/unheard/midi.clj
index c3759fe..93fd6c0 100644
--- a/src/unheard/midi.clj
+++ b/src/unheard/midi.clj
@@ -176,22 +176,21 @@
`flow-handler` should return a flow."
[name flow-handler]
- (m/ap
- (try
- (let [device
- (first
- (select-devices (get-all-midi-device-info)
- name
- true false))]
- (if device
- (m/?
- (with-device device
- (fn [d]
- (with-tx d
- (fn [f]
- (m/reduce prn nil (flow-handler f)))))))
- (m/amb)))
- (catch missionary.Cancelled _ (m/amb)))))
+ (m/sp
+ (let [device
+ (first
+ (select-devices (get-all-midi-device-info)
+ name
+ true false))]
+ (if device
+ (m/?
+ (with-device device
+ (fn [d]
+ (with-tx d
+ (fn [f]
+ (m/reduce prn nil (flow-handler f)))))))
+ (m/amb)))
+ ))
;; TODO: Move elsewhere
(defn echo