diff --git a/common/JackConstants.h b/common/JackConstants.h index fd07f3db..9b6f8c66 100644 --- a/common/JackConstants.h +++ b/common/JackConstants.h @@ -31,6 +31,7 @@ #define JACK_CLIENT_NAME_SIZE 64 +#define FIRST_AVAILABLE_PORT 1 #define PORT_NUM 512 #define PORT_NUM_FOR_CLIENT 256 diff --git a/common/JackGraphManager.cpp b/common/JackGraphManager.cpp index ee32d8b5..5d8ba5a5 100644 --- a/common/JackGraphManager.cpp +++ b/common/JackGraphManager.cpp @@ -276,8 +276,8 @@ jack_port_id_t JackGraphManager::AllocatePortAux(int refnum, const char* port_na { jack_port_id_t port_index; - // Look for first available port Port index start at 1, otherwise a port_index of 0 is "seen" as a NULL port by the external API... - for (port_index = 1; port_index < PORT_NUM; port_index++) { + // Available ports start at FIRST_AVAILABLE_PORT (= 1), otherwise a port_index of 0 is "seen" as a NULL port by the external API... + for (port_index = FIRST_AVAILABLE_PORT; port_index < PORT_NUM; port_index++) { JackPort* port = GetPort(port_index); if (!port->IsUsed()) { JackLog("JackGraphManager::AllocatePortAux port_index = %ld name = %s\n", port_index, port_name); diff --git a/common/JackTransportEngine.cpp b/common/JackTransportEngine.cpp index af484846..cb8065a6 100644 --- a/common/JackTransportEngine.cpp +++ b/common/JackTransportEngine.cpp @@ -117,7 +117,7 @@ void JackTransportEngine::MakeAllStarting(JackClientInterface** table) JackLog("MakeAllStarting\n"); } -void JackTransportEngine::CycleBegin(jack_nframes_t frame_rate, jack_time_t time) // really needed?? (woule be done in CycleEnd...) +void JackTransportEngine::CycleBegin(jack_nframes_t frame_rate, jack_time_t time) // really needed?? (would be done in CycleEnd...) { jack_position_t* pending = WriteNextStateStart(1); // Update "pending" state pending->usecs = time;