diff --git a/common/JackServer.cpp b/common/JackServer.cpp index 7e91af25..9f74b97c 100644 --- a/common/JackServer.cpp +++ b/common/JackServer.cpp @@ -53,8 +53,7 @@ JackServer::JackServer(bool sync, bool temporary, long timeout, bool rt, long p fFreewheelDriver = new JackThreadedDriver(new JackFreewheelDriver("freewheel", fEngine, fSynchroTable)); fLoopbackDriver = new JackLoopbackDriver("loopback", fEngine, fSynchroTable); fChannel = JackGlobals::MakeServerChannel(); - fConnectionState = new JackConnectionManager(); - fFreewheel = false; + fFreewheel = false; fLoopback = loopback; fDriverInfo = NULL; fAudioDriver = NULL; @@ -73,7 +72,6 @@ JackServer::~JackServer() delete fEngine; delete fChannel; delete fEngineControl; - delete fConnectionState; if (fDriverInfo) { UnloadDriverModule(fDriverInfo->handle); free(fDriverInfo); @@ -229,7 +227,7 @@ int JackServer::SetFreewheel(bool onoff) } else { fFreewheel = false; fFreewheelDriver->Stop(); - fGraphManager->Restore(fConnectionState); // Restore previous connection state + fGraphManager->Restore(&fConnectionState); // Restore previous connection state fEngine->NotifyFreewheel(onoff); fFreewheelDriver->SetMaster(false); fEngineControl->InitFrameTime(); @@ -239,7 +237,7 @@ int JackServer::SetFreewheel(bool onoff) if (onoff) { fFreewheel = true; fAudioDriver->Stop(); - fGraphManager->Save(fConnectionState); // Save connection state + fGraphManager->Save(&fConnectionState); // Save connection state fGraphManager->DisconnectAllPorts(fAudioDriver->GetClientControl()->fRefNum); fEngine->NotifyFreewheel(onoff); fFreewheelDriver->SetMaster(true); diff --git a/common/JackServer.h b/common/JackServer.h index e8f88ce8..c0c8ae3b 100644 --- a/common/JackServer.h +++ b/common/JackServer.h @@ -24,13 +24,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "JackExports.h" #include "driver_interface.h" #include "JackDriverLoader.h" +#include "JackConnectionManager.h" #include "jslist.h" namespace Jack { class JackGraphManager; -class JackConnectionManager; class JackDriverClientInterface; class JackServerChannelInterface; class JackSyncInterface; @@ -54,7 +54,8 @@ class EXPORT JackServer JackEngineControl* fEngineControl; JackGraphManager* fGraphManager; JackServerChannelInterface* fChannel; - JackConnectionManager* fConnectionState; + //JackConnectionManager* fConnectionState; + JackConnectionManager fConnectionState; JackSynchro* fSynchroTable[CLIENT_NUM]; bool fFreewheel; long fLoopback;