From 418e268f466fea3654e24943f13c9902e74feefc Mon Sep 17 00:00:00 2001 From: sletz Date: Thu, 9 Jul 2009 10:34:32 +0000 Subject: [PATCH] Add compile time option for maximum ports per application. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3588 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 1 + common/JackConstants.h | 6 +++++- wscript | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0ac6d67..132a9e88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ Paul Davis * Use __attribute__((__packed__)) again, more fixes for 64/32 mixed mode. * Torben Hohn changes for 64/32 mixed mode in wscripts. + * Add compile time option for maximum ports per application. 2009-07-07 Stephane Letz diff --git a/common/JackConstants.h b/common/JackConstants.h index 37a6724e..a8861d9a 100644 --- a/common/JackConstants.h +++ b/common/JackConstants.h @@ -38,10 +38,14 @@ #endif #define DRIVER_PORT_NUM 256 + +#ifndef PORT_NUM_FOR_CLIENT #define PORT_NUM_FOR_CLIENT 512 +#endif + #define FIRST_AVAILABLE_PORT 1 -#define CONNECTION_NUM_FOR_PORT 256 +#define CONNECTION_NUM_FOR_PORT PORT_NUM_FOR_CLIENT #ifndef CLIENT_NUM #define CLIENT_NUM 64 diff --git a/wscript b/wscript index aad43548..8c01c384 100644 --- a/wscript +++ b/wscript @@ -69,6 +69,7 @@ def set_options(opt): opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode') opt.add_option('--clients', default=64, type="int", dest="clients", help='Maximum number of JACK clients') opt.add_option('--ports', default=1024, type="int", dest="ports", help='Maximum number of ports') + opt.add_option('--ports-per-application', default=512, type="int", dest="application_ports", help='Maximum number of ports per application') opt.sub_options('dbus') def configure(conf): @@ -136,7 +137,8 @@ def configure(conf): conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib/' conf.define('CLIENT_NUM', Options.options.clients) - conf.define('PORT_NUM', Options.options. ports) + conf.define('PORT_NUM', Options.options.ports) + conf.define('PORT_NUM_FOR_CLIENT', Options.options.application_ports) conf.define('ADDON_DIR', os.path.normpath(os.path.join(conf.env['LIBDIR'], 'jack'))) conf.define('JACK_LOCATION', os.path.normpath(os.path.join(conf.env['PREFIX'], 'bin'))) @@ -170,6 +172,7 @@ def configure(conf): print "Build with a maximum of %d JACK clients" % conf.env['CLIENT_NUM'] print "Build with a maximum of %d ports" % conf.env['PORT_NUM'] + print "Build with a maximum of %d ports per application" % conf.env['PORT_NUM_FOR_CLIENT'] display_msg("Install prefix", conf.env['PREFIX'], 'CYAN') display_msg("Library directory", conf.env['LIBDIR'], 'CYAN') -- 2.11.4.GIT