Browse Source

Don't allow process callback to be invoked between Engine and JACK::Client destruction.

Patch submitted by Peter Nelson. Comments added.
tags/non-daw-v1.1.0
Jonathan Moore Liles 15 years ago
parent
commit
66daa1e23f
3 changed files with 15 additions and 1 deletions
  1. +4
    -0
      Timeline/Engine/Engine.C
  2. +7
    -1
      nonlib/JACK/Client.C
  3. +4
    -0
      nonlib/JACK/Client.H

+ 4
- 0
Timeline/Engine/Engine.C View File

@@ -38,6 +38,10 @@ Engine::Engine ( ) : _thread( "RT" )

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();
}



+ 7
- 1
nonlib/JACK/Client.C View File

@@ -34,10 +34,16 @@ namespace JACK

Client::~Client ( )
{
jack_deactivate( _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 );
}


/*******************/


+ 4
- 0
nonlib/JACK/Client.H View File

@@ -55,6 +55,10 @@ namespace JACK
Client ( const Client &rhs );
Client & operator = ( const Client &rhs );

protected:

void deactivate ( void );

private:

friend class Port;


Loading…
Cancel
Save