Unverified Commit cf48eedf authored by Karl Linden's avatar Karl Linden
Browse files

Merge branch 'master' into waf-macosx-fixes.

Move aften check to resolve conflict.
parents 1d01f8dc 3dbd4b92
......@@ -216,6 +216,7 @@ Note : To experiment with the -S option, jackdmp must be launched in a console.
1.9.8 : Merge newer-midi branch (Devin Anderson redesign of the MIDI drivers: alsarawmidi, ffado, coremidi and winmme). Correction in jackdmp.cpp: notify_server_stop should be done after server destruction. Correct driver lifetime management. Add XRun detection in PortAudio driver. CELT code for NetJack2. Merge branch switch-master-port-registration-notifications: correct driver port registration. Libjacknet in progress. Correct MIDI in NetJack2. Correct OSX real-time thread setup. Correct rd_acquire in dbus code. Correct NetJack2 connection handling. SaveConnections/RestoreConnections in NetDriver and JackAudioDriver. Special version of jack_attach_shm/jack_release_shm on client side for POSIX shared memory, to solve a memory leak issue. Another round of code improvements to handle completely buggy Digidesign CoreAudio user-land driver. Special CATCH_CLOSE_EXCEPTION_RETURN to handle Close API calls. Add JACK_NETJACK_PORT and JACK_NETJACK_MULTICAST environment variables for NetJack2. NetJack2 now only send data on network only is ports are connected both sides. Fix for "starting two instances of same app in parallel does not work" bug. Enable explicit channel mapping in CoreAudio driver. New JackTimedDriver class to be used by JackDummyDriver, JackNetDriver and JackNetOneDriver classes. More robust code in synchronization primitives and in JackMessageBuffer. More robust Control API implementation. Add jackctl_driver_get_type in Control API. Singleton behaviour for JackCoreMidiDriver and JackWinMMEDriver. John Emmas patch for DSP CPU computation. John Emmas Windows server launching patch. Fix jack_set_port_name API. Enable local access in NetJack2 code. Dynamic port management in JACK/CoreMidi bridge.
1.9.9 : Adrian Knoth fix in midiseq.c. Fix library symbols export issue. Cleanup drivers and internals loading code. jackctl_driver_params_parse API moved in public control.h. More general drivers/internals loading model on Windows. Factorize code the server/client request in JackRequestDecoder class. More robust server/client protocol. Implement shutdown for in server clients. Better time-out management in NetJack2. Experimental system port alias use in Windows JackRouter. Improve ShutDown in NetManager. Correct ShutDown in JackInternalClient and JackLibClient. Fix NetJack2 initialisation bug. Add EndTime function (especially for Windows). Rename JackProcessSync in JackPosixProcessSync. A bit more robust JackMessageBuffer implementation (in progress). Check server API callback from notification thread. Use a time-out in notification channel write function. Fix lock management in JackEngine. In control API, UNIX like sigset_t replaced by more abstract jackctl_sigmask_t * opaque struct. Improve libjacknet master mode. Remove JACK_32_64 flag, so POST_PACKED_STRUCTURE now always used. POST_PACKED_STRUCTURE used for jack_latency_range_t type. Rework JackMessageBuffer. [firewire] Introduce UpdateLatencies() in FFADO backend. [firewire] Allow FFADO backend to change the buffer size. Update waf. New jack_get_cycle_times() implementation from Fons Adriennsen. Align buffers to 32 byte boundaries to allow AVX processing. Extend jack_control to have parameter reset commands. Fix alsa driver parameter order. Control API: Enforce driver/internal parameter order. Fix in ALSA adapter. Devin Anderson patch for Jack/CoreMIDI duplicated messages. Change framework installation hierarchy for OSX Mountain Lion. Update JackCoreAudioDriver and JackCoreAudioAdapter with more recent API. jack_control: fix epr command. Add opus support to NetJack2. More robust channel mapping handling in JackCoreAudioDriver. netjack1/netone opus support. controlapi: fix double free on master switch. Use string ids in the alsa device list. netjack/opus: don't re-init en/decoders. Correct JackPortAudioDriver::Open : special case for ASIO drivers.
1.9.10 : More robust code in JackPortAudioDriver to handle buffer size change and backend switching. Fix bus error on ARM platforms. Dynamically scan and print backend and internal names in jackd. CoreMIDI driver fixes. Rework NetJack2 code (OPUS codec on OSX, latency management, libjacknet code). Correct auto-connect for audioadapter. Add IIO driver. Merge of Nedko no-self-connect branch. Fix freewheel mode. JackServer::SwitchMaster now correctly notify buffer_size and sample_rate changes, cleanup/improvements in JackNetDriver. Tim Mayberry : Add support for building with mingw compiler. Merge of Kim Jeong Yeon Android branch. Partial port of metadata API.
1.9.11 : Various corrections in NetJack2 code. Partial buffers can now be transmitted with libjacknet API. Including S24_LE/BE formats to linux ALSA driver. More robust shared memory allocator. Allow autostart of jackd on OSX where device-names can contain spaces. Correct CoreAudio devices aggregation code. Waf and wscripts improvement and update. More flexible RT priority setup on Windows. New JackProxyDriver. Various fixes in JACK MIDI code. Fix return value of SetTimebaseCallback(). Correct netmanager latency reporting. Implement new jack_port_rename and JackPortRenameCallback API. For OSX El Capitan support, use of Posix semaphore and move of Frameworks in /Library folder. Fix CPU hogging of the midi_thread(). Release audio devices when alsa_driver_new fails. String management fix. Correct JackDriver::Open : call to fGraphManager->SetBufferSize has to use current fEngineControl->fBufferSize value. Use ARM neon intrinsics for AudioBufferMixdown.
This is a work in progress but the implementation is now stable enough to be tested. jackdmp has been used successfully with the following applications : Ardour, Hydrogen, Jamin, QjackCtl, Jack-Rack, SooperLooper, AlsaPlayer...
......@@ -94,9 +94,9 @@ namespace Jack
char fPacketType[8]; //packet type ('param')
uint32_t fProtocolVersion; //version
int32_t fPacketID; //indicates the packet type
char fName[JACK_CLIENT_NAME_SIZE+1]; //slave's name
char fMasterNetName[JACK_SERVER_NAME_SIZE+1]; //master hostname (network)
char fSlaveNetName[JACK_SERVER_NAME_SIZE+1]; //slave hostname (network)
char fName[JACK_CLIENT_NAME_SIZE]; //slave's name
char fMasterNetName[JACK_SERVER_NAME_SIZE]; //master hostname (network)
char fSlaveNetName[JACK_SERVER_NAME_SIZE]; //slave hostname (network)
uint32_t fMtu; //connection mtu
uint32_t fID; //slave's ID
uint32_t fTransportSync; //is the transport synced ?
......@@ -91,7 +91,7 @@ static void copyright(FILE* file)
fprintf(file, "jackdmp " VERSION "\n"
"Copyright 2001-2005 Paul Davis and others.\n"
"Copyright 2004-2015 Grame.\n"
"Copyright 2004-2016 Grame.\n"
"jackdmp comes with ABSOLUTELY NO WARRANTY\n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; see the file COPYING for details\n");
......@@ -120,9 +120,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#endif /* __APPLE__ || __linux__ || __sun__ || sun */
#if defined(__arm__) || defined(__ppc__) || defined(__powerpc__)
#if defined(__arm__) || defined(__aarch64__) || defined(__ppc__) || defined(__powerpc__)
#endif /* __arm__ || __ppc__ || __powerpc__ */
#endif /* __arm__ || __aarch64__ || __ppc__ || __powerpc__ */
#endif /* __jack_systemdeps_h__ */
......@@ -293,7 +293,7 @@ def build(bld):
if bld.env['IS_SUN']:
serverlib.env.append_value("LINKFLAGS", "-lnsl -lsocket")
if bld.env['BUILD_NETLIB'] == True:
if bld.env['BUILD_NETLIB']:
netlib = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
if bld.env['IS_MACOSX']:
netlib.framework = ['CoreAudio']
......@@ -351,7 +351,7 @@ def build(bld):
if bld.env['BUILD_ADAPTER'] == True:
if bld.env['BUILD_ADAPTER']:
process = create_jack_process_obj(bld, 'netadapter', net_adapter_sources, serverlib)
process.use += ['SAMPLERATE']
......@@ -7,7 +7,7 @@
<string>Jackdmp 1.9.11, @03-15 Paul Davis, Grame</string>
<string>Jackdmp 1.9.11, @03-16 Paul Davis, Grame</string>
for i in *.0 ; do
sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date '+%B %Y'`/g" < ${i} > ${i%%0}1
sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date $d '+%B %Y'`/g" < ${i} > ${i%%0}1
......@@ -4,7 +4,6 @@ from __future__ import print_function
import os
import subprocess
g_maxlen = 40
import shutil
import re
import sys
......@@ -25,21 +24,11 @@ lib32 = 'lib32'
auto_options = []
def display_msg(msg, status = None, color = None):
sr = msg
global g_maxlen
g_maxlen = max(g_maxlen, len(msg))
if status:
Logs.pprint('NORMAL', "%s :" % msg.ljust(g_maxlen), sep=' ')
Logs.pprint(color, status)
print("%s" % msg.ljust(g_maxlen))
def display_feature(msg, build):
def display_feature(conf, msg, build):
if build:
display_msg(msg, "yes", 'GREEN')
conf.msg(msg, 'yes', color='GREEN')
display_msg(msg, "no", 'YELLOW')
conf.msg(msg, 'no', color='YELLOW')
# This function prints an error without stopping waf. The reason waf should not
# be stopped is to be able to list all missing dependencies in one chunk.
......@@ -298,12 +287,12 @@ class AutoOption:
conf.define(self.define, 0)
return retvalue
def display_message(self):
def display_message(self, conf):
This function displays a result message with the help text and the
result of the configuration.
display_feature(self.help, self.result)
display_feature(conf, self.help, self.result)
# This function adds an option to the list of auto options and returns the newly
# created option.
......@@ -333,9 +322,9 @@ def configure_auto_options(conf):
conf.fatal('There were unsatisfied requirements.')
# This function displays all options and the configuration results.
def display_auto_options_messages():
def display_auto_options_messages(conf):
for option in auto_options:
def check_for_celt(conf):
found = False
......@@ -403,7 +392,7 @@ def options(opt):
opt.add_option('--mandir', type='string', help="Manpage directory [Default: <prefix>/share/man/man1]")
# options affecting binaries
opt.add_option('--dist-target', type='string', default='auto', help='Specify the target for cross-compiling [auto,mingw]')
opt.add_option('--platform', type='string', default=sys.platform, help='Target platform for cross-compiling, e.g. cygwin or win32')
opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode')
opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Build debuggable binaries')
......@@ -452,33 +441,33 @@ def options(opt):
# this must be called before the configure phase
def configure(conf):
if Options.options.dist_target == 'auto':
platform = sys.platform
conf.env['IS_MACOSX'] = platform == 'darwin'
conf.env['IS_LINUX'] = platform == 'linux' or platform == 'linux2' or platform == 'linux3' or platform == 'posix'
conf.env['IS_SUN'] = platform == 'sunos'
# GNU/kFreeBSD and GNU/Hurd are treated as Linux
if platform.startswith('gnu0') or platform.startswith('gnukfreebsd'):
conf.env['IS_LINUX'] = True
elif Options.options.dist_target == 'mingw':
conf.env['IS_WINDOWS'] = True
def detect_platform(conf):
# GNU/kFreeBSD and GNU/Hurd are treated as Linux
platforms = [
# ('KEY, 'Human readable name', ['strings', 'to', 'check', 'for'])
('IS_LINUX', 'Linux', ['gnu0', 'gnukfreebsd', 'linux', 'posix']),
('IS_MACOSX', 'MacOS X', ['darwin']),
('IS_SUN', 'SunOS', ['sunos']),
('IS_WINDOWS', 'Windows', ['cygwin', 'win32'])
if conf.env['IS_LINUX']:
Logs.pprint('CYAN', "Linux detected")
for key,name,strings in platforms:
conf.env[key] = False
if conf.env['IS_MACOSX']:
Logs.pprint('CYAN', "MacOS X detected")
conf.check(lib='aften', uselib='AFTEN', define_name='AFTEN')
conf.start_msg('Checking platform')
platform = Options.options.platform
for key,name,strings in platforms:
for s in strings:
if platform.startswith(s):
conf.env[key] = True
conf.end_msg(name, color='CYAN')
if conf.env['IS_SUN']:
Logs.pprint('CYAN', "SunOS detected")
def configure(conf):
if conf.env['IS_WINDOWS']:
Logs.pprint('CYAN', "Windows detected")
if conf.env['IS_WINDOWS']:
conf.env.append_unique('CCDEFINES', '_POSIX')
......@@ -487,6 +476,9 @@ def configure(conf):
conf.env.append_unique('CXXFLAGS', '-Wall')
conf.env.append_unique('CFLAGS', '-Wall')
if conf.env['IS_MACOSX']:
conf.check(lib='aften', uselib='AFTEN', define_name='AFTEN')
# configure all auto options
......@@ -551,10 +543,10 @@ def configure(conf):
conf.fatal("Invalid autostart value \"" + Options.options.autostart + "\"")
if Options.options.autostart == "default":
if conf.env['BUILD_JACKDBUS'] == True and conf.env['BUILD_JACKD'] == False:
conf.env['AUTOSTART_METHOD'] = "dbus"
if conf.env['BUILD_JACKD']:
conf.env['AUTOSTART_METHOD'] = 'classic'
conf.env['AUTOSTART_METHOD'] = "classic"
conf.env['AUTOSTART_METHOD'] = 'dbus'
conf.env['AUTOSTART_METHOD'] = Options.options.autostart
......@@ -586,9 +578,9 @@ def configure(conf):
if not conf.env['IS_WINDOWS']:
conf.define('USE_POSIX_SHM', 1)
conf.define('JACKMP', 1)
if conf.env['BUILD_JACKDBUS'] == True:
if conf.env['BUILD_JACKDBUS']:
conf.define('JACK_DBUS', 1)
if conf.env['BUILD_WITH_PROFILE'] == True:
if conf.env['BUILD_WITH_PROFILE']:
conf.define('JACK_MONITOR', 1)
conf.write_config_header('config.h', remove=False)
......@@ -603,7 +595,7 @@ def configure(conf):
except IOError:
if Options.options.mixed == True:
if Options.options.mixed:
conf.setenv(lib32, env=conf.env.derive())
conf.env.append_unique('CXXFLAGS', '-m32')
conf.env.append_unique('CFLAGS', '-m32')
......@@ -615,7 +607,7 @@ def configure(conf):
version_msg = "JACK " + VERSION
if svnrev:
version_msg += " exported from r" + svnrev
......@@ -623,39 +615,47 @@ def configure(conf):
version_msg += " svn revision will checked and eventually updated during build"
print("Build with a maximum of %d JACK clients" % Options.options.clients)
print("Build with a maximum of %d ports per application" % Options.options.application_ports)
display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
display_msg("Library directory", conf.all_envs[""]['LIBDIR'], 'CYAN')
if conf.env['BUILD_WITH_32_64'] == True:
display_msg("32-bit library directory", conf.all_envs[lib32]['LIBDIR'], 'CYAN')
display_msg("Drivers directory", conf.env['ADDON_DIR'], 'CYAN')
display_feature('Build debuggable binaries', conf.env['BUILD_DEBUG'])
display_msg('C compiler flags', repr(conf.all_envs[""]['CFLAGS']))
display_msg('C++ compiler flags', repr(conf.all_envs[""]['CXXFLAGS']))
display_msg('Linker flags', repr(conf.all_envs[""]['LINKFLAGS']))
if conf.env['BUILD_WITH_32_64'] == True:
display_msg('32-bit C compiler flags', repr(conf.all_envs[lib32]['CFLAGS']))
display_msg('32-bit C++ compiler flags', repr(conf.all_envs[lib32]['CXXFLAGS']))
display_msg('32-bit linker flags', repr(conf.all_envs[lib32]['LINKFLAGS']))
display_feature('Build with engine profiling', conf.env['BUILD_WITH_PROFILE'])
display_feature('Build with 32/64 bits mixed mode', conf.env['BUILD_WITH_32_64'])
display_feature('Build standard JACK (jackd)', conf.env['BUILD_JACKD'])
display_feature('Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'])
display_msg('Autostart method', conf.env['AUTOSTART_METHOD'])
conf.msg('Maximum JACK clients', Options.options.clients, color='NORMAL')
conf.msg('Maximum ports per application', Options.options.application_ports, color='NORMAL')
conf.msg('Install prefix', conf.env['PREFIX'], color='CYAN')
conf.msg('Library directory', conf.all_envs[""]['LIBDIR'], color='CYAN')
if conf.env['BUILD_WITH_32_64']:
conf.msg('32-bit library directory', conf.all_envs[lib32]['LIBDIR'], color='CYAN')
conf.msg('Drivers directory', conf.env['ADDON_DIR'], color='CYAN')
display_feature(conf, 'Build debuggable binaries', conf.env['BUILD_DEBUG'])
tool_flags = [
('C compiler flags', ['CFLAGS', 'CPPFLAGS']),
('C++ compiler flags', ['CXXFLAGS', 'CPPFLAGS']),
('Linker flags', ['LINKFLAGS', 'LDFLAGS'])
for name,vars in tool_flags:
flags = []
for var in vars:
flags += conf.all_envs[""][var]
conf.msg(name, repr(flags), color='NORMAL')
if conf.env['BUILD_WITH_32_64']:
conf.msg('32-bit C compiler flags', repr(conf.all_envs[lib32]['CFLAGS']))
conf.msg('32-bit C++ compiler flags', repr(conf.all_envs[lib32]['CXXFLAGS']))
conf.msg('32-bit linker flags', repr(conf.all_envs[lib32]['LINKFLAGS']))
display_feature(conf, 'Build with engine profiling', conf.env['BUILD_WITH_PROFILE'])
display_feature(conf, 'Build with 32/64 bits mixed mode', conf.env['BUILD_WITH_32_64'])
display_feature(conf, 'Build standard JACK (jackd)', conf.env['BUILD_JACKD'])
display_feature(conf, 'Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'])
conf.msg('Autostart method', conf.env['AUTOSTART_METHOD'])
if conf.env['BUILD_JACKDBUS'] and conf.env['BUILD_JACKD']:
print(Logs.colors.RED + 'WARNING !! mixing both jackd and jackdbus may cause issues:' + Logs.colors.NORMAL)
print(Logs.colors.RED + 'WARNING !! jackdbus does not use .jackdrc nor qjackctl settings' + Logs.colors.NORMAL)
# display configuration result messages for auto options
if conf.env['BUILD_JACKDBUS'] == True:
display_msg('D-Bus service install directory', conf.env['DBUS_SERVICES_DIR'], 'CYAN')
#display_msg('Settings persistence', xxx)
if conf.env['BUILD_JACKDBUS']:
conf.msg('D-Bus service install directory', conf.env['DBUS_SERVICES_DIR'], color='CYAN')
if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS_SERVICES_DIR_REAL']:
......@@ -955,15 +955,8 @@ def build_drivers(bld):
source = oss_src)
def build(bld):
if not bld.variant:
out2 = out
out2 = out + "/" + bld.variant
print("make[1]: Entering directory `" + os.getcwd() + "/" + out2 + "'")
if not bld.variant:
if bld.env['BUILD_WITH_32_64'] == True:
Options.commands.append(bld.cmd + '_' + lib32)
if not bld.variant and bld.env['BUILD_WITH_32_64']:
Options.commands.append(bld.cmd + '_' + lib32)
# process subfolders from here
......@@ -997,30 +990,15 @@ def build(bld):
if bld.env['IS_LINUX']:
if bld.env['BUILD_JACKDBUS'] == True:
if bld.env['IS_MACOSX']:
if bld.env['BUILD_JACKDBUS'] == True:
if bld.env['IS_SUN']:
if not bld.env['IS_WINDOWS']:
if bld.env['BUILD_JACKDBUS'] == True:
if bld.env['IS_WINDOWS']:
if bld.env['BUILD_JACKDBUS']:
if bld.env['BUILD_DOXYGEN_DOCS'] == True:
if bld.env['BUILD_DOXYGEN_DOCS']:
html_build_dir = bld.path.find_or_declare('html').abspath()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment