rtaudio/core
src/rtaudio/core.tur
defn
audio-new
(audio-new [api :cstr] :ptr<void>)
create an RtAudio handle for the given backend API.
Parameters
| api | backend keyword: ":alsa", ":core-audio", ":wasapi", ":jack", ":dummy", | |
| or any other value for RTAUDIO_API_UNSPECIFIED (auto-select) |
Returns
(ok handle) on success; (err 0) if rtaudio_create returned NULL. Pass handle as :int to other rtaudio/* functions. Free with audio-free when done.
Example
(let [r (audio-new ":core-audio")]
(if (ok? r) (let [a (ok-val r)] ...) (println "audio init failed")))
Since: RA0
defn
audio-free
(audio-free [a :int] :void)
destroy an RtAudio handle created with audio-new.
Parameters
| a | audio handle (ok-val from audio-new) |
Returns
void
Example
(audio-free a)
Since: RA0
defn
audio-api
(audio-api [a :int] :cstr)
return the name string of the active backend API.
Parameters
| a | audio handle (ok-val from audio-new) |
Returns
A :cstr naming the active API, e.g. "core", "alsa", "wasapi".
Example
(println (audio-api a))
Since: RA0
Internal definitions
__ok-- create an ok result wrapping integer value v.__err-- create an err result wrapping integer error value e.