Compare commits
No commits in common. "aadbd26fabe9f818fe9d6fbcfe31a37a4e91fdd9" and "227ab3f45dd29c0083383143b88410fb8a0d5cea" have entirely different histories.
aadbd26fab
...
227ab3f45d
|
@ -67,20 +67,17 @@ proc midiEventPrinterProc() {.thread.} =
|
|||
|
||||
dataReadyLock.acquire()
|
||||
|
||||
while true:
|
||||
while not exitLoop:
|
||||
while not exitLoop and ringbufferReadSpace(rb) >= 4:
|
||||
var read = cast[int](ringbufferRead(rb, cast[cstring](recvBuf.addr), 4))
|
||||
|
||||
if recvBuf[0] <= 3:
|
||||
for i in 0..<recvBuf[0].int:
|
||||
stdout.write(fmt"0x{recvBuf[i+1]:02X} ")
|
||||
stdout.write(fmt"{recvBuf[i+1]:#02X} ")
|
||||
|
||||
stdout.write("\n")
|
||||
stdout.flushFile()
|
||||
|
||||
if exitLoop:
|
||||
break
|
||||
|
||||
dataReady.wait(dataReadyLock)
|
||||
|
||||
dataReadyLock.release()
|
||||
|
|
|
@ -67,7 +67,7 @@ proc midiEventPrinterProc() =
|
|||
break
|
||||
elif event.size <= 3:
|
||||
for i in 0..<event.size:
|
||||
stdout.write(fmt"0x{event.buffer[i]:02X} ")
|
||||
stdout.write(fmt"{event.buffer[i]:#02X} ")
|
||||
|
||||
stdout.write("\n")
|
||||
stdout.flushFile()
|
||||
|
|
Loading…
Reference in New Issue