feat: wrap latency API
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
parent
4c5deaa272
commit
73e8248c2e
|
@ -86,6 +86,10 @@ type
|
||||||
PortIsTerminal = 0x10
|
PortIsTerminal = 0x10
|
||||||
|
|
||||||
type
|
type
|
||||||
|
LatencyRange* = object
|
||||||
|
min*: NFrames
|
||||||
|
max*: NFrames
|
||||||
|
|
||||||
LatencyCallbackMode* {.size: sizeof(cint) pure.} = enum
|
LatencyCallbackMode* {.size: sizeof(cint) pure.} = enum
|
||||||
CaptureLatency,
|
CaptureLatency,
|
||||||
PlaybackLatency
|
PlaybackLatency
|
||||||
|
@ -553,24 +557,22 @@ proc midiGetLostEventCount*(portBuffer: pointer): uint32 {.importc: "jack_midi_g
|
||||||
|
|
||||||
# -------------------------------- Latency --------------------------------
|
# -------------------------------- Latency --------------------------------
|
||||||
|
|
||||||
#[ FIXME: not implemented yet
|
|
||||||
# void jack_port_set_latency (jack_port_t *port, jack_nframes_t)
|
|
||||||
proc portSetLatency*(port: PortP; a2: NFrames) {.importc: "jack_port_set_latency".}
|
|
||||||
|
|
||||||
# void jack_port_get_latency_range (jack_port_t *port, jack_latency_callback_mode_t mode, jack_latency_range_t *range)
|
# void jack_port_get_latency_range (jack_port_t *port, jack_latency_callback_mode_t mode, jack_latency_range_t *range)
|
||||||
proc portGetLatencyRange*(port: PortP; mode: LatencyCallbackMode;
|
proc portGetLatencyRange*(port: PortP; mode: LatencyCallbackMode; range: ptr LatencyRange) {.
|
||||||
range: ptr LatencyRange) {.importc: "jack_port_get_latency_range".}
|
importc: "jack_port_get_latency_range".}
|
||||||
|
|
||||||
proc portSetLatencyRange*(port: PortP; mode: LatencyCallbackMode;
|
# void jack_port_set_latency_range (jack_port_t *port, jack_latency_callback_mode_t mode, jack_latency_range_t *range)
|
||||||
range: ptr LatencyRange) {.importc: "jack_port_set_latency_range".}
|
proc portSetLatencyRange*(port: PortP; mode: LatencyCallbackMode; range: ptr LatencyRange) {.
|
||||||
|
importc: "jack_port_set_latency_range".}
|
||||||
|
|
||||||
|
# int jack_recompute_total_latencies (jack_client_t *)
|
||||||
proc recomputeTotalLatencies*(client: ClientP): cint {.importc: "jack_recompute_total_latencies".}
|
proc recomputeTotalLatencies*(client: ClientP): cint {.importc: "jack_recompute_total_latencies".}
|
||||||
|
|
||||||
proc portGetLatency*(port: PortP): NFrames {.importc: "jack_port_get_latency".}
|
#[ DEPRECATED
|
||||||
|
jack_nframes_t jack_port_get_latency (jack_port_t *port)
|
||||||
proc portGetTotalLatency*(client: ClientP; port: PortP): NFrames {.importc: "jack_port_get_total_latency".}
|
jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port)
|
||||||
|
void jack_port_set_latency (jack_port_t *port, jack_nframes_t)
|
||||||
proc recomputeTotalLatency*(a1: ClientP; port: PortP): cint {.importc: "jack_recompute_total_latency".}
|
int jack_recompute_total_latency (jack_client_t *, jack_port_t *port)
|
||||||
]#
|
]#
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue