summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-10 17:11:10 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-10 17:11:10 -0500
commit658bb3ccd43658de18fbd43cd91a8e66650e27a7 (patch)
tree6a64705a20919b8d53b73601d0c3b4f4df6f5b15 /libs
parent3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2 (diff)
parentb1231696caa7d08c80055ca59b18f4b634dc47cf (diff)
finished merge of cairocanvas with windows and windows+cc branches
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/debug.h1
-rw-r--r--libs/ardour/ardour/directory_names.h1
-rw-r--r--libs/ardour/ardour/session_event.h4
-rw-r--r--libs/ardour/audio_buffer.cc2
-rw-r--r--libs/ardour/audio_diskstream.cc2
-rw-r--r--libs/ardour/io.cc2
-rw-r--r--libs/ardour/mtc_slave.cc6
-rw-r--r--libs/ardour/panner_search_path.cc7
-rw-r--r--libs/ardour/session_state.cc9
-rw-r--r--libs/ardour/test/audio_engine_test.cc53
-rw-r--r--libs/ardour/test/audio_engine_test.h14
-rw-r--r--libs/ardour/wscript5
-rw-r--r--libs/backends/jack/jack_connection.cc4
-rw-r--r--libs/backends/jack/jack_session.cc2
-rw-r--r--libs/backends/jack/jack_utils.cc4
-rw-r--r--libs/backends/jack/wscript4
-rw-r--r--libs/gtkmm2ext/wscript2
-rw-r--r--libs/pbd/fpu.cc5
-rw-r--r--libs/pbd/pathexpand.cc52
-rw-r--r--libs/pbd/pbd/abstract_ui.h4
-rw-r--r--libs/taglib/wscript75
21 files changed, 217 insertions, 41 deletions
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index c26710b620..d5d81b8772 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -35,6 +35,7 @@ namespace PBD {
LIBARDOUR_API extern uint64_t SnapBBT;
LIBARDOUR_API extern uint64_t Configuration;
LIBARDOUR_API extern uint64_t Latency;
+ LIBARDOUR_API extern uint64_t Peaks;
LIBARDOUR_API extern uint64_t Processors;
LIBARDOUR_API extern uint64_t ProcessThreads;
LIBARDOUR_API extern uint64_t Graph;
diff --git a/libs/ardour/ardour/directory_names.h b/libs/ardour/ardour/directory_names.h
index 9eb2254219..db5d770739 100644
--- a/libs/ardour/ardour/directory_names.h
+++ b/libs/ardour/ardour/directory_names.h
@@ -27,6 +27,7 @@ namespace ARDOUR {
LIBARDOUR_API extern const char* const old_sound_dir_name;
LIBARDOUR_API extern const char* const sound_dir_name;
+ LIBARDOUR_API extern const char* const ladspa_dir_name;
LIBARDOUR_API extern const char* const midi_dir_name;
LIBARDOUR_API extern const char* const midi_patch_dir_name;
LIBARDOUR_API extern const char* const video_dir_name;
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index d4102a62ef..1283f32004 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -109,7 +109,7 @@ public:
boost::shared_ptr<Region> region;
- SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false)
+ SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false)
: type (t)
, action (a)
, action_frame (when)
@@ -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/audio_buffer.cc b/libs/ardour/audio_buffer.cc
index b4e2a55ac2..aa4f64755a 100644
--- a/libs/ardour/audio_buffer.cc
+++ b/libs/ardour/audio_buffer.cc
@@ -88,7 +88,7 @@ AudioBuffer::check_silence (pframes_t nframes, bool wholebuffer, pframes_t& n) c
void
AudioBuffer::silence (framecnt_t len, framecnt_t offset) {
- pframes_t n = 0;
+
if (!_silent) {
assert(_capacity > 0);
assert(offset + len <= _capacity);
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index f4d10c2043..dd2dcf324e 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<ChannelList> c = channels.reader();
- snprintf (buf, sizeof(buf), "%zd", c->size());
+ snprintf (buf, sizeof(buf), "%u", (unsigned int) c->size());
node.add_property ("channels", buf);
if (!capturing_sources.empty() && _session.get_record_enabled()) {
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<char> 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/panner_search_path.cc b/libs/ardour/panner_search_path.cc
index 2889063ca4..c400aa6c3b 100644
--- a/libs/ardour/panner_search_path.cc
+++ b/libs/ardour/panner_search_path.cc
@@ -35,14 +35,11 @@ Searchpath
panner_search_path ()
{
Searchpath spath(user_config_directory ());
+
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths(panner_dir_name);
-<<<<<<< HEAD
- spath += SearchPath(Glib::getenv(panner_env_variable_name));
-=======
-
spath += Searchpath(Glib::getenv(panner_env_variable_name));
->>>>>>> windows+cc
+
return spath;
}
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/test/audio_engine_test.cc b/libs/ardour/test/audio_engine_test.cc
new file mode 100644
index 0000000000..b992caf73e
--- /dev/null
+++ b/libs/ardour/test/audio_engine_test.cc
@@ -0,0 +1,53 @@
+#include <iostream>
+
+#include "ardour/audioengine.h"
+#include "ardour/audio_backend.h"
+#include "ardour/backend_search_path.h"
+
+#include "audio_engine_test.h"
+#include "test_common.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION (AudioEngineTest);
+
+using namespace std;
+using namespace ARDOUR;
+using namespace PBD;
+
+void
+print_audio_backend_info (AudioBackendInfo const* abi)
+{
+ cerr << "Audio Backend, name:" << abi->name << endl;
+}
+
+void
+AudioEngineTest::test_backends ()
+{
+ AudioEngine* engine = AudioEngine::create ();
+
+ CPPUNIT_ASSERT (engine);
+
+ std::vector<AudioBackendInfo const *> backends = engine->available_backends ();
+
+ CPPUNIT_ASSERT (backends.size () != 0);
+
+ for (std::vector<AudioBackendInfo const *>::const_iterator i = backends.begin();
+ i != backends.end(); ++i) {
+ print_audio_backend_info(*i);
+ }
+}
+
+void
+AudioEngineTest::test_start ()
+{
+ AudioEngine* engine = AudioEngine::create ();
+
+ CPPUNIT_ASSERT_NO_THROW (engine->set_default_backend ());
+
+ init_post_engine ();
+
+ CPPUNIT_ASSERT (engine->start () == 0);
+
+ // sleep
+ // stop
+ // destroy
+}
diff --git a/libs/ardour/test/audio_engine_test.h b/libs/ardour/test/audio_engine_test.h
new file mode 100644
index 0000000000..9a6d9cc241
--- /dev/null
+++ b/libs/ardour/test/audio_engine_test.h
@@ -0,0 +1,14 @@
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class AudioEngineTest : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE (AudioEngineTest);
+ CPPUNIT_TEST (test_backends);
+ CPPUNIT_TEST (test_start);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+ void test_backends ();
+ void test_start ();
+};
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 21f745e20b..29efde2693 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)
@@ -445,6 +442,7 @@ def build(bld):
testcommon.source += [ 'sse_functions_64bit.s' ]
if bld.env['SINGLE_TESTS']:
+ create_ardour_test_program(bld, obj.includes, 'audio_engine_test', 'test_audio_engine', ['test/audio_engine_test.cc'])
create_ardour_test_program(bld, obj.includes, 'automation_list_property_test', 'test_automation_list_property', ['test/automation_list_property_test.cc'])
create_ardour_test_program(bld, obj.includes, 'bbt', 'test_bbt', ['test/bbt_test.cc'])
create_ardour_test_program(bld, obj.includes, 'tempo', 'test_tempo', ['test/tempo_test.cc'])
@@ -463,6 +461,7 @@ def build(bld):
create_ardour_test_program(bld, obj.includes, 'session_test', 'test_session', ['test/session_test.cc'])
test_sources = '''
+ test/audio_engine_test.cc
test/automation_list_property_test.cc
test/bbt_test.cc
test/tempo_test.cc
diff --git a/libs/backends/jack/jack_connection.cc b/libs/backends/jack/jack_connection.cc
index 09e6c9d6e7..fee1b299ba 100644
--- a/libs/backends/jack/jack_connection.cc
+++ b/libs/backends/jack/jack_connection.cc
@@ -21,6 +21,8 @@
#include <boost/scoped_ptr.hpp>
#include <jack/session.h>
+#include <glibmm/timer.h>
+
#include "pbd/epa.h"
#include "jack_connection.h"
@@ -145,7 +147,7 @@ JackConnection::close ()
_jack = 0;
/* If we started JACK, it will be closing down */
- usleep (500000);
+ Glib::usleep (500000);
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 <jack/jack.h>
#include <jack/transport.h>
+#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<string>::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 4e54af0be5..b31d9b5d56 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' ]
diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript
index c87e1aa1d0..bae2fbe439 100644
--- a/libs/gtkmm2ext/wscript
+++ b/libs/gtkmm2ext/wscript
@@ -87,7 +87,7 @@ def build(bld):
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=gtkmm2ext_sources)
# defines for this library
- obj.defines = [ 'LIBGTKMM2EXT_DLL_EXPORTS=1' ]
+ obj.defines = [ 'LIBGTKMM2EXT_DLL_EXPORTS', 'ABSTRACT_UI_EXPORTS' ]
obj.cxxflags = [ '-fvisibility=hidden' ]
obj.cflags = [ '-fvisibility=hidden' ]
else:
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc
index 73bc7e599d..b12d341366 100644
--- a/libs/pbd/fpu.cc
+++ b/libs/pbd/fpu.cc
@@ -39,11 +39,14 @@ FPU::FPU ()
_flags = Flags (0);
+#if defined(__MINGW64__) // Vkamyshniy: under __MINGW64__ the assembler code below is not compiled
+ return;
+#endif
+
#if !( (defined __x86_64__) || (defined __i386__) ) // !ARCH_X86
return;
#else
-
#ifndef _LP64 //USE_X86_64_ASM
asm volatile (
"mov $1, %%eax\n"
diff --git a/libs/pbd/pathexpand.cc b/libs/pbd/pathexpand.cc
index 5784ec9428..26454e4164 100644
--- a/libs/pbd/pathexpand.cc
+++ b/libs/pbd/pathexpand.cc
@@ -33,12 +33,57 @@
using std::string;
using std::vector;
+#ifdef COMPILER_MINGW
+
+#include <stdlib.h>
+#include <glibmm.h>
+
+/****************************************************************
+ * Emulate POSIX realpath() using Win32 _fullpath() since realpath()
+ * is not available.
+ *
+ * Returns:
+ * On Success: A pointer to the resolved (absolute) path
+ * On Failure: 0 (NULL)
+ */
+
+static char*
+realpath (const char *original_path, char resolved_path[_MAX_PATH+1])
+{
+ char *rpath = 0;
+ bool bIsSymLink = false; // We'll probably need to test the incoming path
+ // to find out if it points to a Windows shortcut
+ // (or a hard link) and set this appropriately.
+
+ if (bIsSymLink) {
+ // At the moment I'm not sure if Windows '_fullpath()' is directly
+ // equivalent to POSIX 'realpath()' - in as much as the latter will
+ // resolve the supplied path if it happens to point to a symbolic
+ // link ('_fullpath()' probably DOESN'T do this but I'm not really
+ // sure if Ardour needs such functionality anyway). Therefore we'll
+ // possibly need to add that functionality here at a later date.
+ } else {
+ char temp[(_MAX_PATH+1)*6]; // Allow for maximum length of a path in wchar characters
+
+ // POSIX 'realpath()' requires that the buffer size is at
+ // least PATH_MAX+1, so assume that the user knew this !!
+
+ rpath = _fullpath (temp, Glib::locale_from_utf8 (original_path).c_str(), _MAX_PATH);
+
+ if (0 != rpath) {
+ snprintf (resolved_path, _MAX_PATH+1, "%s", Glib::locale_to_utf8 (temp).c_str());
+ }
+
+ }
+
+ return (rpath);
+}
+
+#endif // COMPILER_MINGW
+
string
PBD::canonical_path (const std::string& path)
{
-#ifdef COMPILER_MINGW
- return path;
-#else
char buf[PATH_MAX+1];
if (!realpath (path.c_str(), buf) && (errno != ENOENT)) {
@@ -46,7 +91,6 @@ PBD::canonical_path (const std::string& path)
}
return string (buf);
-#endif
}
string
diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h
index 1ceefe7b3b..dc5620b2ef 100644
--- a/libs/pbd/pbd/abstract_ui.h
+++ b/libs/pbd/pbd/abstract_ui.h
@@ -52,7 +52,7 @@
class Touchable;
template<typename RequestObject>
-class /*ABSTRACT_UI_API*/ AbstractUI : public BaseUI /* see notes in visibility.h about why this is not LIBPBD_API */
+class ABSTRACT_UI_API AbstractUI : public BaseUI
{
public:
AbstractUI (const std::string& name);
@@ -75,7 +75,7 @@ class /*ABSTRACT_UI_API*/ AbstractUI : public BaseUI /* see notes in visibility.
};
typedef typename RequestBuffer::rw_vector RequestBufferVector;
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) && !defined (__MINGW64__)
struct pthread_cmp
{
diff --git a/libs/taglib/wscript b/libs/taglib/wscript
index 8c1f1fdd1e..709eb0fd90 100644
--- a/libs/taglib/wscript
+++ b/libs/taglib/wscript
@@ -34,6 +34,79 @@ def build(bld):
if bld.is_defined('USE_EXTERNAL_LIBS'):
return
+ # the story: taglib distributes its headers all over the place then copies them
+ # into place during an install. but we're not planning to do an install. so this
+ # doesn't work when code does #include <taglib/foo.h>.
+ #
+ # one approach is to store symlinks in the repository. but this breaks on windows
+ # where symlink support and git are not very well developed (if at all)
+ #
+ # the approach here is to copy the header files as part of the build step, if necessary
+
+ headers = [
+ './ape/apefooter.h',
+ './ape/apeitem.h',
+ './ape/apetag.h',
+ './mpeg/id3v2/frames/attachedpictureframe.h',
+ './mpeg/id3v2/frames/commentsframe.h',
+ './flac/flacfile.h',
+ './flac/flacproperties.h',
+ './mpeg/id3v2/frames/generalencapsulatedobjectframe.h',
+ './mpeg/id3v1/id3v1genres.h',
+ './mpeg/id3v1/id3v1tag.h',
+ './mpeg/id3v2/id3v2extendedheader.h',
+ './mpeg/id3v2/id3v2footer.h',
+ './mpeg/id3v2/id3v2framefactory.h',
+ './mpeg/id3v2/id3v2frame.h',
+ './mpeg/id3v2/id3v2header.h',
+ './mpeg/id3v2/id3v2synchdata.h',
+ './mpeg/id3v2/id3v2tag.h',
+ './mpc/mpcfile.h',
+ './mpc/mpcproperties.h',
+ './mpeg/mpegfile.h',
+ './mpeg/mpegheader.h',
+ './mpeg/mpegproperties.h',
+ './ogg/oggfile.h',
+ './ogg/flac/oggflacfile.h',
+ './ogg/oggpage.h',
+ './ogg/oggpageheader.h',
+ './mpeg/id3v2/frames/relativevolumeframe.h',
+ './ogg/speex/speexfile.h',
+ './ogg/speex/speexproperties.h',
+ './toolkit/taglib.h',
+ './toolkit/tbytevector.h',
+ './toolkit/tbytevectorlist.h',
+ './toolkit/tdebug.h',
+ './mpeg/id3v2/frames/textidentificationframe.h',
+ './toolkit/tfile.h',
+ './toolkit/tlist.h',
+ 'toolkit/tlist.tcc',
+ './toolkit/tmap.h',
+ 'toolkit/tmap.tcc',
+ './trueaudio/trueaudiofile.h',
+ './trueaudio/trueaudioproperties.h',
+ './toolkit/tstring.h',
+ './toolkit/tstringlist.h',
+ './toolkit/unicode.h',
+ './mpeg/id3v2/frames/uniquefileidentifierframe.h',
+ './mpeg/id3v2/frames/unknownframe.h',
+ './mpeg/id3v2/frames/unsynchronizedlyricsframe.h',
+ './mpeg/id3v2/frames/urllinkframe.h',
+ './ogg/vorbis/vorbisfile.h',
+ './ogg/vorbis/vorbisproperties.h',
+ './wavpack/wavpackfile.h',
+ './wavpack/wavpackproperties.h',
+ './mpeg/xingheader.h',
+ './ogg/xiphcomment.h',
+ ]
+
+ for h in headers:
+ tgt = bld.path.get_bld().make_node (os.path.join ('taglib', os.path.basename (h)))
+ if not os.path.exists (tgt.bldpath()):
+ bld (rule = autowaf.copyfile,
+ source = bld.path.make_node (os.path.join ('taglib', h)),
+ target = tgt)
+
# Library
obj = bld(features = 'cxx cxxshlib')
sources = bld.path.ant_glob('taglib/*.cpp')
@@ -69,7 +142,7 @@ def build(bld):
taglib/ogg/speex
taglib/ogg/flac
'''.split()
- obj.export_includes = ['.', 'taglib', 'taglib/toolkit']
+ obj.export_includes = ['.', 'taglib' ]
obj.includes = include_dirs
obj.defines = ['MAKE_TAGLIB_LIB']
obj.name = 'libtaglib'