Compare commits

...

2 Commits

Author SHA1 Message Date
Christopher Arndt e793add4d0 fix: make ClientT and PortT distinct types
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2022-10-06 05:11:25 +02:00
Christopher Arndt c41b1eb03e fix: set calling convention for callback function prototypes
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2022-10-06 05:10:49 +02:00
2 changed files with 20 additions and 20 deletions

View File

@ -15,7 +15,7 @@ proc cleanup() {.noconv.} =
quit 0 quit 0
proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) {.exportc.} = proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) {.cdecl.} =
let portAPtr = portById(client, portA) let portAPtr = portById(client, portA)
let portBPtr = portById(client, portB) let portBPtr = portById(client, portB)

View File

@ -38,9 +38,9 @@ type
PortTypeIdT* = culong PortTypeIdT* = culong
type type
ClientT = object ClientT = distinct object
ClientTPtr* = ptr ClientT ClientTPtr* = ptr ClientT
PortT = object PortT = distinct object
PortTPtr* = ptr PortT PortTPtr* = ptr PortT
@ -86,23 +86,23 @@ type
# Callback function types # Callback function types
type type
JackProcessCallback* = proc (nframes: NframesT; arg: pointer): cint JackProcessCallback* = proc (nframes: NframesT; arg: pointer): cint {.cdecl.}
JackThreadCallback* = proc (arg: pointer): pointer JackThreadCallback* = proc (arg: pointer): pointer {.cdecl.}
JackThreadInitCallback* = proc (arg: pointer) JackThreadInitCallback* = proc (arg: pointer) {.cdecl.}
JackGraphOrderCallback* = proc (arg: pointer): cint JackGraphOrderCallback* = proc (arg: pointer): cint {.cdecl.}
JackXRunCallback* = proc (arg: pointer): cint JackXRunCallback* = proc (arg: pointer): cint {.cdecl.}
JackBufferSizeCallback* = proc (nframes: NframesT; arg: pointer): cint JackBufferSizeCallback* = proc (nframes: NframesT; arg: pointer): cint {.cdecl.}
JackSampleRateCallback* = proc (nframes: NframesT; arg: pointer): cint JackSampleRateCallback* = proc (nframes: NframesT; arg: pointer): cint {.cdecl.}
JackPortRegistrationCallback* = proc (port: PortIdT; flag: cint; arg: pointer) JackPortRegistrationCallback* = proc (port: PortIdT; flag: cint; arg: pointer) {.cdecl.}
JackClientRegistrationCallback* = proc (name: cstring; flag: cint; arg: pointer) JackClientRegistrationCallback* = proc (name: cstring; flag: cint; arg: pointer) {.cdecl.}
JackPortConnectCallback* = proc (portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) JackPortConnectCallback* = proc (portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) {.cdecl.}
JackPortRenameCallback* = proc (port: PortIdT; oldName: cstring; newName: cstring; arg: pointer) JackPortRenameCallback* = proc (port: PortIdT; oldName: cstring; newName: cstring; arg: pointer) {.cdecl.}
JackFreewheelCallback* = proc (starting: cint; arg: pointer) JackFreewheelCallback* = proc (starting: cint; arg: pointer) {.cdecl.}
JackShutdownCallback* = proc (arg: pointer) JackShutdownCallback* = proc (arg: pointer) {.cdecl.}
JackInfoShutdownCallback* = proc (code: JackStatus; reason: cstring; arg: pointer) JackInfoShutdownCallback* = proc (code: JackStatus; reason: cstring; arg: pointer) {.cdecl.}
JackLatencyCallback* = proc (mode: JackLatencyCallbackMode; arg: pointer) JackLatencyCallback* = proc (mode: JackLatencyCallbackMode; arg: pointer) {.cdecl.}
JackInfoCallback* = proc (msg: cstring) JackInfoCallback* = proc (msg: cstring) {.cdecl.}
JackErrorCallback* = proc (msg: cstring) JackErrorCallback* = proc (msg: cstring) {.cdecl.}
# ----------------------------- Version info ------------------------------ # ----------------------------- Version info ------------------------------