No matching definitions.

rtaudio/stream

src/rtaudio/stream.tur
defn

stream-open

(stream-open [a :int out-device :int out-chans :int in-device :int in-chans :int format :cstr sample-rate :int buf-frames :int callback :int] :ptr<void>)

configure and open an audio stream.

aaudio handle (ok-val from audio-new)
out-deviceoutput device index (-1 to disable output)
out-chansnumber of output channels (0 to disable output)
in-deviceinput device index (-1 to disable input)
in-chansnumber of input channels (0 to disable input)
formatsample format keyword: ":int16", ":int32", ":float32", ":float64"
sample-ratedesired sample rate in Hz (e.g. 44100, 48000)
buf-framesbuffer size in frames (e.g. 256, 512)
callbackaudio callback function pointer as :int (cast to rtaudio_cb_t)

(ok 0) on success; (err 0) on failure.

(let [r (stream-open a 0 2 -1 0 ":float32" 44100 512 my-cb)]
    (if (ok? r) (stream-start a) (println "stream-open failed")))

Since: RA0

defn

stream-start

(stream-start [a :int] :ptr<void>)

begin audio processing on an open stream.

aaudio handle (ok-val from audio-new)

(ok 0) on success; (err 0) on failure.

(stream-start a)

Since: RA0

defn

stream-stop

(stream-stop [a :int] :void)

stop audio processing without closing the stream.

aaudio handle (ok-val from audio-new)

void

(stream-stop a)

Since: RA0

defn

stream-close

(stream-close [a :int] :void)

close the audio stream and release its resources.

aaudio handle (ok-val from audio-new)

void

(stream-close a)

Since: RA0

defn

stream-latency

(stream-latency [a :int] :int)

return the stream latency in frames.

aaudio handle (ok-val from audio-new)

Latency in frames as :int.

(println (stream-latency a))

Since: RA0

defn

stream-sample-rate

(stream-sample-rate [a :int] :int)

return the stream sample rate in Hz.

aaudio handle (ok-val from audio-new)

Sample rate as :int (e.g. 44100).

(println (stream-sample-rate a))

Since: RA0

Internal definitions
__ok-- create an ok result wrapping integer value v.
__err-- create an err result wrapping integer error value e.