summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-12-14 16:18:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-12-14 16:18:47 +0000
commitc9c94ca1c247adfc1a78fda0eda185a9a7589696 (patch)
tree52d520020e7ff2455b8abf83fbcc69a4ba02b9ca /libs/ardour
parentfd1414f6668712c641da6c7d51f4b3e2bf6fae5a (diff)
merge robin gareus' libltc into ardour source tree for convenience
git-svn-id: svn://localhost/ardour2/branches/3.0@13665 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/session.h6
-rw-r--r--libs/ardour/ardour/slave.h6
-rw-r--r--libs/ardour/globals.cc2
-rw-r--r--libs/ardour/session.cc4
-rw-r--r--libs/ardour/session_process.cc6
-rw-r--r--libs/ardour/session_state.cc4
-rw-r--r--libs/ardour/session_time.cc2
-rw-r--r--libs/ardour/session_transport.cc5
-rw-r--r--libs/ardour/wscript13
9 files changed, 7 insertions, 41 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index b2a077162c..414a3204bd 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -48,6 +48,7 @@
#include "midi++/types.h"
#include "timecode/time.h"
+#include "ltc/ltc.h"
#include "ardour/ardour.h"
#include "ardour/chan_count.h"
@@ -64,9 +65,6 @@
#include <jack/session.h>
#endif
-#ifdef HAVE_LTC
-#include <ltc.h>
-#endif
class XMLTree;
class XMLNode;
@@ -1189,7 +1187,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
int send_midi_time_code_for_cycle (framepos_t, framepos_t, pframes_t nframes);
-#ifdef HAVE_LTC
LTCEncoder* ltc_encoder;
ltcsnd_sample_t* ltc_enc_buf;
@@ -1216,7 +1213,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void ltc_tx_recalculate_position();
void ltc_tx_parse_offset();
void ltc_tx_send_time_code_for_cycle (framepos_t, framepos_t, double, double, pframes_t nframes);
-#endif
void reset_record_status ();
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index d5cb79c522..471a632f6e 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -29,14 +29,12 @@
#include "pbd/signals.h"
#include "timecode/time.h"
+#include "ltc/ltc.h"
#include "ardour/types.h"
#include "midi++/parser.h"
#include "midi++/types.h"
-#ifdef HAVE_LTC
-#include <ltc.h>
-#endif
/* used for approximate_current_delta(): */
#define PLUSMINUS(A) ( ((A)<0) ? "-" : (((A)>0) ? "+" : "\u00B1") )
@@ -335,7 +333,6 @@ class MTC_Slave : public TimecodeSlave {
void parameter_changed(std::string const & p);
};
-#ifdef HAVE_LTC
class LTC_Slave : public TimecodeSlave {
public:
LTC_Slave (Session&);
@@ -403,7 +400,6 @@ public:
double e2; ///< second order loop error
double b, c; ///< DLL filter coefficients
};
-#endif
class MIDIClock_Slave : public Slave {
public:
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 2b0bc05534..613ecbfc7d 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -484,9 +484,7 @@ ARDOUR::get_available_sync_options ()
ret.push_back (JACK);
ret.push_back (MTC);
ret.push_back (MIDIClock);
-#ifdef HAVE_LTC
ret.push_back (LTC);
-#endif
return ret;
}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 3b46ad3be1..78caf7abc4 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -152,9 +152,7 @@ Session::Session (AudioEngine &eng,
, _suspend_timecode_transmission (0)
{
_locations = new Locations (*this);
-#ifdef HAVE_LTC
ltc_encoder = NULL;
-#endif
if (how_many_dsp_threads () > 1) {
/* For now, only create the graph if we are using >1 DSP threads, as
@@ -244,9 +242,7 @@ Session::destroy ()
Port::PortDrop (); /* EMIT SIGNAL */
-#ifdef HAVE_LTC
ltc_tx_cleanup();
-#endif
/* clear history so that no references to objects are held any more */
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index bd5cc66451..05b800fead 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -116,9 +116,7 @@ Session::no_roll (pframes_t nframes)
_click_io->silence (nframes);
}
-#ifdef HAVE_LTC
ltc_tx_send_time_code_for_cycle (_transport_frame, end_frame, _target_transport_speed, _transport_speed, nframes);
-#endif
if (_process_graph) {
DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/no-roll\n");
@@ -793,9 +791,7 @@ Session::process_without_events (pframes_t nframes)
if (!_exporting && _slave) {
if (!follow_slave (nframes)) {
-#ifdef HAVE_LTC
ltc_tx_send_time_code_for_cycle (_transport_frame, _transport_frame, 0, 0 , nframes);
-#endif
return;
}
}
@@ -817,9 +813,7 @@ Session::process_without_events (pframes_t nframes)
send_midi_time_code_for_cycle (_transport_frame, _transport_frame + frames_moved, nframes);
}
-#ifdef HAVE_LTC
ltc_tx_send_time_code_for_cycle (_transport_frame, _transport_frame + frames_moved, _target_transport_speed, _transport_speed, nframes);
-#endif
framepos_t const stop_limit = compute_stop_limit ();
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index a1f457393a..c38d4aa781 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -367,9 +367,7 @@ Session::second_stage_init ()
MIDI::Name::MidiPatchManager::instance().set_session (this);
-#ifdef HAVE_LTC
ltc_tx_initialize();
-#endif
/* initial program change will be delivered later; see ::config_changed() */
_state_of_the_state = Clean;
@@ -3566,10 +3564,8 @@ Session::config_changed (std::string p, bool ours)
reconnect_ltc_input ();
} else if (p == "ltc-sink-port") {
reconnect_ltc_output ();
-#ifdef HAVE_LTC
} else if (p == "timecode-generator-offset") {
ltc_tx_parse_offset();
-#endif
}
set_dirty ();
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 72d8fb1e89..7c0127c9df 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -95,9 +95,7 @@ Session::sync_time_vars ()
}
break;
};
-#ifdef HAVE_LTC
ltc_tx_parse_offset();
-#endif
}
void
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index ae5a8157c7..037ca83484 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1386,7 +1386,6 @@ Session::switch_to_sync_source (SyncSource src)
break;
case LTC:
-#ifdef HAVE_LTC
if (_slave && dynamic_cast<LTC_Slave*>(_slave)) {
return;
}
@@ -1398,9 +1397,7 @@ Session::switch_to_sync_source (SyncSource src)
catch (failed_constructor& err) {
return;
}
-#else
- return;
-#endif
+
break;
case MIDIClock:
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index f47ba0a3b2..b37acb0271 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -116,6 +116,7 @@ libardour_sources = [
'ladspa_plugin.cc',
'location.cc',
'location_importer.cc',
+ 'ltc_slave.cc',
'meter.cc',
'midi_automation_list_binder.cc',
'midi_buffer.cc',
@@ -184,6 +185,7 @@ libardour_sources = [
'session_events.cc',
'session_export.cc',
'session_handle.cc',
+ 'session_ltc.cc',
'session_metadata.cc',
'session_midi.cc',
'session_object.cc',
@@ -216,7 +218,7 @@ libardour_sources = [
'user_bundle.cc',
'utils.cc',
'version.cc',
- 'worker.cc',
+ 'worker.cc'
]
def flac_supported():
@@ -281,8 +283,6 @@ def configure(conf):
atleast_version='1.2.1')
autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL',
atleast_version='7.0.0')
- autowaf.check_pkg(conf, 'ltc', uselib_store='LTC',
- atleast_version='1.1.0', mandatory=False)
# we don't try to detect this, since its part of our source tree
@@ -380,7 +380,7 @@ def build(bld):
'OSX','BOOST','CURL','DL']
obj.use = ['libpbd','libmidipp','libevoral','libvamphost',
'libvampplugin','libtaglib','librubberband',
- 'libaudiographer']
+ 'libaudiographer','libltc']
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.defines = [
@@ -396,11 +396,6 @@ def build(bld):
#obj.uselib += ' SOUNDTOUCH '
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
- if bld.is_defined('HAVE_LTC') :
- obj.source += ['ltc_slave.cc']
- obj.source += ['session_ltc.cc']
- obj.uselib += ['LTC']
-
if bld.is_defined('HAVE_LILV') :
obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc']
obj.uselib += ['LILV']