Patch submitted by Peter Nelson. Comments added.tags/non-daw-v1.1.0
@@ -38,6 +38,10 @@ Engine::Engine ( ) : _thread( "RT" ) | |||||
Engine::~Engine ( ) | Engine::~Engine ( ) | ||||
{ | { | ||||
/* We have to deactivate here in order to avoid our process | |||||
callback is being invoked after we're already destroyed, but | |||||
before the base class is */ | |||||
deactivate(); | |||||
} | } | ||||
@@ -34,10 +34,16 @@ namespace JACK | |||||
Client::~Client ( ) | Client::~Client ( ) | ||||
{ | { | ||||
jack_deactivate( _client ); | |||||
jack_client_close( _client ); | jack_client_close( _client ); | ||||
} | } | ||||
/** Tell JACK to calling process callback. This MUST be called in | |||||
* an inheriting class' destructor */ | |||||
void | |||||
Client::deactivate ( ) | |||||
{ | |||||
jack_deactivate( _client ); | |||||
} | |||||
/*******************/ | /*******************/ | ||||
@@ -55,6 +55,10 @@ namespace JACK | |||||
Client ( const Client &rhs ); | Client ( const Client &rhs ); | ||||
Client & operator = ( const Client &rhs ); | Client & operator = ( const Client &rhs ); | ||||
protected: | |||||
void deactivate ( void ); | |||||
private: | private: | ||||
friend class Port; | friend class Port; | ||||