ravelox / pimidi

Raspberry Pi RTP MIDI
162 stars 38 forks source link

Updated applemidi_sync_responder() to finish on CK2 reception #94

Closed pierz closed 3 years ago

pierz commented 3 years ago

The applemidi_sync_responder() function was not terminating the the sync sequence on reception of CK2, leading to a CK loop (see #92), as it was returning a CK0 in response to a CK2, when acting as the sync session Responder.

This patch terminates the sync sequence on reception of a CK2 packet and returns a NULL response. It also debug logs the calculated latency offset estimate (from: https://developer.apple.com/library/archive/documentation/Audio/Conceptual/MIDINetworkDriverProtocol/MIDI/MIDI.html)

ravelox commented 3 years ago

Thank you for finding and fixing this