From 33bd24b9d01e812935dbd80fe417fa3e597c2281 Mon Sep 17 00:00:00 2001 From: sletz Date: Thu, 1 May 2008 13:08:06 +0000 Subject: [PATCH] Cleanup git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2228 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/JackConstants.h | 16 +++++++--------- common/JackFreewheelDriver.cpp | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/common/JackConstants.h b/common/JackConstants.h index 5da7e2ed..6eba6132 100644 --- a/common/JackConstants.h +++ b/common/JackConstants.h @@ -27,8 +27,6 @@ namespace Jack #define VERSION "0.72" -#define FORK_SERVER 1 - #define BUFFER_SIZE_MAX 8192 #define JACK_PORT_NAME_SIZE 256 @@ -44,12 +42,10 @@ namespace Jack #define CLIENT_NUM 64 -#define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0 -#define FREEWHEEL_DRIVER_REFNUM 1 // Freewheel driver is initialized second, it will get the refnum 1 -#define LOOPBACK_DRIVER_REFNUM 2 // Loopback driver is initialized third, it will get the refnum 2 -#define REAL_REFNUM LOOPBACK_DRIVER_REFNUM + 1 // Real clients start at LOOPBACK_DRIVER_REFNUM + 1 - -#define SOCKET_TIME_OUT 5 +#define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0 +#define FREEWHEEL_DRIVER_REFNUM 1 // Freewheel driver is initialized second, it will get the refnum 1 +#define LOOPBACK_DRIVER_REFNUM 2 // Loopback driver is initialized third, it will get the refnum 2 +#define REAL_REFNUM LOOPBACK_DRIVER_REFNUM + 1 // Real clients start at LOOPBACK_DRIVER_REFNUM + 1 #ifdef WIN32 #define jack_server_dir "server" @@ -76,7 +72,9 @@ namespace Jack #define JACK_PROTOCOL_VERSION 3 #endif -#define DRIVER_OPEN_TIMEOUT 5 // in sec +#define SOCKET_TIME_OUT 5 // in sec +#define DRIVER_OPEN_TIMEOUT 5 // in sec +#define FREEWHEEL_DRIVER_TIMEOUT 10 // in sec #define NO_PORT 0xFFFE diff --git a/common/JackFreewheelDriver.cpp b/common/JackFreewheelDriver.cpp index c84cc9ab..5b965653 100644 --- a/common/JackFreewheelDriver.cpp +++ b/common/JackFreewheelDriver.cpp @@ -36,7 +36,7 @@ int JackFreewheelDriver::Process() fLastWaitUst = GetMicroSeconds(); fEngine->Process(fLastWaitUst); fGraphManager->ResumeRefNum(fClientControl, fSynchroTable); // Signal all clients - if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, 10 * 1000000) < 0) { // Wait for all clients to finish for 10 sec + if (fGraphManager->SuspendRefNum(fClientControl, fSynchroTable, FREEWHEEL_DRIVER_TIMEOUT * 1000000) < 0) { // Wait for all clients to finish for 10 sec jack_error("JackFreewheelDriver::ProcessSync SuspendRefNum error"); return -1; }