melizalab / jill

realtime electrophysiology, behavioral, and acoustic recording system
http://melizalab.github.io/jill
3 stars 5 forks source link

jrecord event logs corrupted on OS X Lion, JACK OS X #1

Closed dmeliza closed 10 years ago

dmeliza commented 11 years ago

The stored MIDI messages in jrecord have the wrong status byte and empty or garbage messages. Can't replicate on Snow Leopard with MacPorts JACK1 or on Debian (also JACK1). Possibly related to how JACK OS X integrates with coreaudio?

dmeliza commented 10 years ago

This was caused by a difference between jack versions in the size of midi messages that are inlined in the port buffer vs being stored elsewhere. If the message is stored elsewhere, the pointer may become invalid by the time the data are pulled off the ringbuffer. Fixed by directly serializing midi messages to the ringbuffer rather than copying the port buffer. See patch @5a3bf5d0d99601cfc8c5c989a7fd1c011e79646b