JackOutput accidentally activated the jack client pointer too early.
authorGabriel M. Beddingfield <gabriel@teuton.org>
Sun, 24 Jan 2010 20:27:10 +0000 (14:27 -0600)
committerGabriel M. Beddingfield <gabriel@teuton.org>
Sun, 24 Jan 2010 20:27:10 +0000 (14:27 -0600)
commit7c2dbd5ba6af068fe47c22bf2232b99a87d14671
treeb172ab478d8b3455b837cf4fd70c6eeefe72679e
parent99a28dffdac88a81d9550993a58586f3ff749fb9
JackOutput accidentally activated the jack client pointer too early.

This created a sort of deadlock.
EnginePrivate::audioEngine_startAudioDrivers() would lock the mutex to
the audio driver.  When the audio driver is initialized, it would
activate the jack client... which uses the
EnginePrivate::audioEngine_process_clearAudioBuffers() -- and which
locks the same mutex.  All well and good... except that...

The mutex takes too long, and the jack server terminates the thread.
When audioEngine_startAudioDrivers() unlocks the thread, it tries to
signal the wait condition to the locking instance in
audioEngine_process_clearAudioBuffers().  But, since the thread was
terminated... this is now an invalid memory location and the program
hangs.
src/Tritium/src/IO/JackOutput.cpp