diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index e90ab71e26..8629f83c85 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -36,7 +36,7 @@ namespace ARDOUR { class Slave; class Region; -class LIBARDOUR_API SessionEvent { +class SessionEvent { public: enum Type { SetTransportSpeed, @@ -151,7 +151,7 @@ private: friend class Butler; }; -class LIBARDOUR_API SessionEventManager { +class SessionEventManager { public: SessionEventManager () : pending_events (2048), auto_loop_event(0), punch_out_event(0), punch_in_event(0) {} diff --git a/libs/ardour/ardour/visibility.h b/libs/ardour/ardour/visibility.h index b702e94edb..09287b877d 100644 --- a/libs/ardour/ardour/visibility.h +++ b/libs/ardour/ardour/visibility.h @@ -20,36 +20,6 @@ #ifndef __libardour_visibility_h__ #define __libardour_visibility_h__ -#ifdef LIBARDOUR_IS_IN_WIN_STATIC_LIB // #define if your project uses libardour (under Windows) as a static library -#define LIBARDOUR_IS_IN_WINDLL 0 -#endif - -#if !defined(LIBARDOUR_IS_IN_WINDLL) - #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW) - // If you need '__declspec' compatibility, add extra compilers to the above as necessary - #define LIBARDOUR_IS_IN_WINDLL 1 - #else - #define LIBARDOUR_IS_IN_WINDLL 0 - #endif -#endif - -#if LIBARDOUR_IS_IN_WINDLL && !defined(LIBARDOUR_API) - #if defined(BUILDING_LIBARDOUR) - #define LIBARDOUR_API __declspec(dllexport) - #define LIBARDOUR_APICALLTYPE __cdecl - #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point - #define LIBARDOUR_API __declspec(dllimport) - #define LIBARDOUR_APICALLTYPE __cdecl - #else - #error "Attempting to define __declspec with an incompatible compiler !" - #endif -#elif !defined(LIBARDOUR_API) - // Other compilers / platforms could be accommodated here (as an example, see LIBARDOUR_HELPER_DLL, below) - #define LIBARDOUR_API - #define LIBARDOUR_APICALLTYPE -#endif - - /* _WIN32 is defined by most compilers targetting Windows, but within the * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending * on how a Windows build is built. diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index f4d10c2043..0a9393e980 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1789,7 +1789,7 @@ AudioDiskstream::get_state () LocaleGuard lg (X_("POSIX")); boost::shared_ptr c = channels.reader(); - snprintf (buf, sizeof(buf), "%zd", c->size()); + snprintf (buf, sizeof(buf), "%d", c->size()); node.add_property ("channels", buf); if (!capturing_sources.empty() && _session.get_record_enabled()) { diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 0119aa642c..607606f4c7 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -472,7 +472,7 @@ AudioEngine::discover_backends () Glib::PatternSpec so_extension_pattern("*backend.so"); Glib::PatternSpec dylib_extension_pattern("*backend.dylib"); - Glib::PatternSpec dll_extension_pattern("*backend.dll"); + Glib::PatternSpec dll_extension_pattern("*backend*.dll"); find_matching_files_in_search_path (backend_search_path (), so_extension_pattern, backend_modules); diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index ebd295411e..2cc213f797 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -1414,7 +1414,7 @@ IO::find_port_hole (const char* base) std::vector buf (AudioEngine::instance()->port_name_size()); PortSet::iterator i = _ports.begin(); - snprintf (&buf[0], jack_port_name_size(), _("%s %u"), base, n); + snprintf (&buf[0], buf.size()+1, _("%s %u"), base, n); for ( ; i != _ports.end(); ++i) { if (string(i->name()) == string(&buf[0])) { diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 0dee2a071b..1a1c5f2bec 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -309,11 +309,7 @@ MTC_Slave::update_mtc_time (const MIDI::byte *msg, bool was_full, framepos_t now to use a timestamp indicating when this MTC time was received. example: when we received a locate command via MMC. */ -#ifdef COMPILER_MSVC - DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", ::pthread_self().p)); -#else - DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", ::pthread_self())); -#endif + DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", pthread_name())); TimecodeFormat tc_format; bool reset_tc = true; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index bbd3432205..5c3ffae3cc 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -136,14 +136,7 @@ Session::pre_engine_init (string fullpath) /* discover canonical fullpath */ - char buf[PATH_MAX+1]; - if (!realpath (fullpath.c_str(), buf) && (errno != ENOENT)) { - error << string_compose(_("Could not use path %1 (%2)"), buf, strerror(errno)) << endmsg; - destroy (); - throw failed_constructor(); - } - - _path = string(buf); + _path = canonical_path(fullpath); /* we require _path to end with a dir separator */ diff --git a/libs/ardour/wscript b/libs/ardour/wscript index e7dcf45635..b509db361f 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -259,9 +259,6 @@ def configure(conf): autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0') - if re.search ("linux", sys.platform) != None: - autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA') - if Options.options.lv2: autowaf.check_pkg(conf, 'lv2', uselib_store='LV2', atleast_version='1.0.0', mandatory=True) diff --git a/libs/backends/jack/jack_connection.cc b/libs/backends/jack/jack_connection.cc index 09e6c9d6e7..77c86b9143 100644 --- a/libs/backends/jack/jack_connection.cc +++ b/libs/backends/jack/jack_connection.cc @@ -145,7 +145,11 @@ JackConnection::close () _jack = 0; /* If we started JACK, it will be closing down */ +#ifdef PLATFORM_WINDOWS + Sleep(500); +#else usleep (500000); +#endif Disconnected (""); /* EMIT SIGNAL */ diff --git a/libs/backends/jack/jack_session.cc b/libs/backends/jack/jack_session.cc index 7cd7f6c62b..60d11a8f0c 100644 --- a/libs/backends/jack/jack_session.cc +++ b/libs/backends/jack/jack_session.cc @@ -25,6 +25,8 @@ #include #include +#include "pbd/localtime_r.h" + #include "ardour/audioengine.h" #include "ardour/filename_extensions.h" #include "ardour/session.h" diff --git a/libs/backends/jack/jack_utils.cc b/libs/backends/jack/jack_utils.cc index 331c164353..01af13fe9c 100644 --- a/libs/backends/jack/jack_utils.cc +++ b/libs/backends/jack/jack_utils.cc @@ -891,11 +891,7 @@ ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& c ostringstream oss; for (vector::const_iterator i = args.begin(); i != args.end();) { -#ifdef WIN32 - oss << quote_string (*i); -#else oss << *i; -#endif if (++i != args.end()) oss << ' '; } diff --git a/libs/backends/jack/wscript b/libs/backends/jack/wscript index c5c506525a..b827c95cfe 100644 --- a/libs/backends/jack/wscript +++ b/libs/backends/jack/wscript @@ -20,6 +20,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.121.0') + # # PortAudio is currently used to get a list of audio device names. # We should find a better way to do this that doesn't involve this @@ -43,7 +45,7 @@ def build(bld): obj.includes = ['.'] obj.name = 'jack_audiobackend' obj.target = 'jack_audiobackend' - if Options.options.dist_target == 'mingw': + if (bld.env['build_target'] == 'mingw'): obj.uselib = [ 'JACK', 'PORTAUDIO' ] else: obj.uselib = [ 'JACK' ]