#5 Prevent JACK zombiefication

closed-out-of-date
nobody
None
5
2006-06-05
2006-05-31
larsl
No

ZynAddSubFX has a pthread_mutex_lock() call in its JACK
process callback. This may block and cause jackd to
kick Zyn from the JACK graph for taking too long to
complete its cycle. This happens often for me when
loading instruments, especially when loading
instruments right after launching Zyn (for example when
loading a LASH session). This patch changes the
pthread_mutex_lock() call to pthread_mutex_trylock()
and fills the output buffers with 0 samples if it can't
acquire the mutex.

This means that instead of getting kicked from the JACK
graph and having to restart Zyn you get a short audio
glitch (which may not even be audible if it happens
while loading an instrument). This is of course still
not optimal, but getting rid of the glitch altogether
would require some design changes.

The patch applies to Zyn with the LASH + JACK MIDI
patch. I don't think it applies to the unpatched
version of ZynAddSubFX 2.2.1.

Discussion

  • larsl

    larsl - 2006-05-31
     
  • larsl

    larsl - 2006-06-05
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks