Fork me on GitHub
#nbb
<
2022-09-14
>
Benjamin10:09:02

Hi, do you know why, error with overload resolution failed in thread

Benjamin10:09:06

(defonce ctx (js/window.AudioContext.))

(def panner (. ctx createStereoPanner))
(.. panner (connect ctx.destination))
;; this works

(defn ->panner [ctx left?]
  (let [panner (. ctx createStereoPanner)]
    (set! (.. panner -pan -value) (if left? -1 1))
    (.. panner (connect ctx.destination))
    panner))

;; error
(->panner ctx false)


;; => "#error {:message \"Failed to execute 'connect' on 'AudioNode': Overload resolution failed.\", :data {:type :sci/error, :line 1, :column 1, :message \"Failed to execute 'connect' on 'AudioNode': Overload resolution failed.\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao playground], :file nil, :sci.impl/f-meta {:name ->panner, :ns #object[Ao playground], :file \"playground.cljs\", :line 1, :column 1, :arglists ([ctx left?])}} {:line 1, :column 1, :ns #object[Ao playground], :file nil, :sci.impl/f-meta {:name ->panner, :ns #object[Ao playground], :file \"playground.cljs\", :line 1, :column 1, :arglists ([ctx left?])}})}], :file nil}, :cause #object[TypeError TypeError: Failed to execute 'connect' on 'AudioNode': Overload resolution failed.]}"

Benjamin10:09:29

it is skittle

borkdude21:09:17

Hey @U02CV2P4J6S - I don't know this API. Do you think it's scittle related? We can talk in #scittle