2022-10-06 04:18:57 +02:00
|
|
|
import jacket
|
|
|
|
|
2022-10-06 16:28:25 +02:00
|
|
|
var jclient: ClientTPtr
|
2022-10-06 04:18:57 +02:00
|
|
|
var time: TimeT
|
|
|
|
var status: cint
|
|
|
|
|
2022-10-06 16:28:25 +02:00
|
|
|
jclient = clientOpen("test_jacket", NullOption.ord, addr status)
|
2022-10-06 04:18:57 +02:00
|
|
|
|
2022-10-06 16:28:25 +02:00
|
|
|
echo "Server status: " & $status
|
2022-10-06 04:18:57 +02:00
|
|
|
|
2022-10-06 16:28:25 +02:00
|
|
|
if jclient == nil:
|
2022-10-06 04:18:57 +02:00
|
|
|
echo getJackStatusErrorString(status)
|
|
|
|
quit 1
|
|
|
|
|
|
|
|
time = getTime()
|
2022-10-06 16:28:25 +02:00
|
|
|
let ver = getVersionString()
|
|
|
|
echo "JACK version: " & $ver
|
|
|
|
let rate = getSampleRate(jclient)
|
|
|
|
echo "Sample rate: " & $rate
|
|
|
|
let bufsize = getBufferSize(jclient)
|
|
|
|
echo "Buffer size: " & $bufsize
|
|
|
|
let load = cpuLoad(jclient)
|
|
|
|
echo "DSP load: " & $load & "%"
|
|
|
|
echo "Server time: " & $time
|
|
|
|
let name = getClientName(jclient)
|
|
|
|
echo "Client name: " & $name
|
|
|
|
let rt = if isRealtime(jclient) > 0: "yes" else: "no"
|
|
|
|
echo "RT enabled: " & rt
|
2022-10-06 04:18:57 +02:00
|
|
|
|
2022-10-06 16:28:25 +02:00
|
|
|
discard clientClose(jclient)
|