No matching definitions.

rtaudio/devices

src/rtaudio/devices.tur
defn

device-count

(device-count [a :int] :int)

return the number of audio devices available.

aaudio handle (ok-val from audio-new)

Number of devices as :int.

(let [n (device-count a)] (println n))

Since: RA0

defn

device-info

(device-info [a :int id :int] :int)

retrieve a device-info struct for the device at index id.

aaudio handle (ok-val from audio-new)
iddevice index (0-based, must be < device-count)

A __dev_info* as :int. Access fields with device-info-* accessors. Free with device-info-free when done.

(let [di (device-info a 0)]
    (println (device-info-name di))
    (device-info-free di))

Since: RA0

defn

device-info-name

(device-info-name [di :int] :cstr)

return the device name string.

didevice-info handle from device-info

Device name as :cstr (owned by the di struct; do not free separately).

(println (device-info-name di))

Since: RA0

defn

device-info-output-chans

(device-info-output-chans [di :int] :int)

return the number of output channels.

didevice-info handle from device-info

Output channel count as :int.

(println (device-info-output-chans di))

Since: RA0

defn

device-info-input-chans

(device-info-input-chans [di :int] :int)

return the number of input channels.

didevice-info handle from device-info

Input channel count as :int.

(println (device-info-input-chans di))

Since: RA0

defn

device-info-sample-rates

(device-info-sample-rates [di :int] :int)

return the supported sample rates as a cons list.

didevice-info handle from device-info

Cons list head as :int; each cell value is a sample rate in Hz. 0 is the empty-list sentinel.

(let [rates (device-info-sample-rates di)]
    (while (!= rates 0)
      (println (head rates))
      (set! rates (tail rates))))

Since: RA0

defn

device-default-output

(device-default-output [a :int] :int)

return the index of the default output device.

aaudio handle (ok-val from audio-new)

Default output device index as :int.

(let [id (device-default-output a)] ...)

Since: RA0

defn

device-default-input

(device-default-input [a :int] :int)

return the index of the default input device.

aaudio handle (ok-val from audio-new)

Default input device index as :int.

(let [id (device-default-input a)] ...)

Since: RA0

defn

device-info-free

(device-info-free [di :int] :void)

free all memory associated with a device-info handle.

didevice-info handle from device-info

void

(device-info-free di)

Since: RA0

Internal definitions
__nil-- return the empty list sentinel (0).
__cons-- prepend a value to a cons list; returns new cell as :int.