summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-12-03 11:51:25 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2013-12-03 11:51:25 -0500
commit8648a8a13b04549362f14a0738947d997ef1abc7 (patch)
tree702652b49789b13d647c4c93df985f65361a4118 /libs/ardour/ardour
parentc428ec14b923928690492cab0428f8fad45f7658 (diff)
parentae6b0b9f1ab02ab949eaf741b98e69bdab487e92 (diff)
fix up wscript/build issues in exportvis after merge with master
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/audio_backend.h84
-rw-r--r--libs/ardour/ardour/audio_buffer.h2
-rw-r--r--libs/ardour/ardour/audioengine.h1
-rw-r--r--libs/ardour/ardour/audiofile_tagger.h6
-rw-r--r--libs/ardour/ardour/buffer.h4
-rw-r--r--libs/ardour/ardour/midi_ui.h3
-rw-r--r--libs/ardour/ardour/plugin.h18
-rw-r--r--libs/ardour/ardour/port_engine.h5
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h1
-rw-r--r--libs/ardour/ardour/route.h15
-rw-r--r--libs/ardour/ardour/session.h11
-rw-r--r--libs/ardour/ardour/session_configuration_vars.h1
-rw-r--r--libs/ardour/ardour/slave.h2
-rw-r--r--libs/ardour/ardour/types.h8
14 files changed, 98 insertions, 63 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 175fc5bbf3..267d3acb70 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -118,6 +118,17 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
* at any time.
*/
virtual std::vector<float> available_sample_rates (const std::string& device) const = 0;
+
+ /* Returns the default sample rate that will be shown to the user when
+ * configuration options are first presented. If the derived class
+ * needs or wants to override this, it can. It also MUST override this
+ * if there is any chance that an SR of 44.1kHz is not in the list
+ * returned by available_sample_rates()
+ */
+ virtual float default_sample_rate () const {
+ return 44100.0;
+ }
+
/** Returns a collection of uint32 identifying buffer sizes that are
* potentially usable with the hardware identified by @param device.
* Any of these values may be supplied in other calls to this backend
@@ -127,6 +138,16 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
*/
virtual std::vector<uint32_t> available_buffer_sizes (const std::string& device) const = 0;
+ /* Returns the default buffer size that will be shown to the user when
+ * configuration options are first presented. If the derived class
+ * needs or wants to override this, it can. It also MUST override this
+ * if there is any chance that a buffer size of 1024 is not in the list
+ * returned by available_buffer_sizes()
+ */
+ virtual uint32_t default_buffer_size () const {
+ return 1024;
+ }
+
/** Returns the maximum number of input channels that are potentially
* usable with the hardware identified by @param device. Any number from 1
* to the value returned may be supplied in other calls to this backend as
@@ -262,17 +283,7 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
virtual std::string midi_option () const = 0;
/* State Control */
-
- /* non-virtual method to avoid possible overrides of default
- * parameters. See Scott Meyers or other books on C++ to
- * understand this pattern, or possibly just this:
- *
- * http://stackoverflow.com/questions/12139786/good-pratice-default-arguments-for-pure-virtual-method
- */
- int start (bool for_latency_measurement=false) {
- return _start (for_latency_measurement);
- }
-
+
/** Start using the device named in the most recent call
* to set_device(), with the parameters set by various
* the most recent calls to set_sample_rate() etc. etc.
@@ -288,8 +299,24 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
* any existing systemic latency settings.
*
* Return zero if successful, negative values otherwise.
- */
- virtual int _start (bool for_latency_measurement) = 0;
+ *
+ *
+ *
+ *
+ * Why is this non-virtual but ::_start() is virtual ?
+ * Virtual methods with default parameters create possible ambiguity
+ * because a derived class may implement the same method with a different
+ * type or value of default parameter.
+ *
+ * So we make this non-virtual method to avoid possible overrides of
+ * default parameters. See Scott Meyers or other books on C++ to understand
+ * this pattern, or possibly just this:
+ *
+ * http://stackoverflow.com/questions/12139786/good-pratice-default-arguments-for-pure-virtual-method
+ */
+ int start (bool for_latency_measurement=false) {
+ return _start (for_latency_measurement);
+ }
/** Stop using the device currently in use.
*
@@ -307,20 +334,6 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
*/
virtual int stop () = 0;
- /** Temporarily cease using the device named in the most recent call to set_parameters().
- *
- * If the function is successfully called, no subsequent calls to the
- * process_callback() of @param engine will be made after the function
- * returns, until start() is called again.
- *
- * The backend will retain its existing parameter configuration after a successful
- * return, and does NOT require any calls to set hardware parameters before it can be
- * start()-ed again.
- *
- * Return zero if successful, 1 if the device is not in use, negative values on error
- */
- virtual int pause () = 0;
-
/** While remaining connected to the device, and without changing its
* configuration, start (or stop) calling the process_callback() of @param engine
* without waiting for the device. Once process_callback() has returned, it
@@ -458,8 +471,25 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
virtual void update_latencies () = 0;
+ /** Set @param speed and @param position to the current speed and position
+ * indicated by some transport sync signal. Return whether the current
+ * transport state is pending, or finalized.
+ *
+ * Derived classes only need implement this if they provide some way to
+ * sync to a transport sync signal (e.g. Sony 9 Pin) that is not
+ * handled by Ardour itself (LTC and MTC are both handled by Ardour).
+ * The canonical example is JACK Transport.
+ */
+ virtual bool speed_and_position (double& speed, framepos_t& position) {
+ speed = 0.0;
+ position = 0;
+ return false;
+ }
+
protected:
AudioEngine& engine;
+
+ virtual int _start (bool for_latency_measurement) = 0;
};
struct LIBARDOUR_API AudioBackendInfo {
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h
index 58157a7919..5f72065d63 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -207,7 +207,7 @@ public:
return _data + offset;
}
- bool check_silence (pframes_t, pframes_t&) const;
+ bool check_silence (pframes_t, pframes_t&) const;
void prepare () { _written = false; _silent = false; }
bool written() const { return _written; }
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index e769b9eec1..499f8324eb 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -86,7 +86,6 @@ public:
int start (bool for_latency_measurement=false);
int stop (bool for_latency_measurement=false);
- int pause ();
int freewheel (bool start_stop);
float get_cpu_load() const ;
void transport_start ();
diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h
index 9b24ffade3..88789f9036 100644
--- a/libs/ardour/ardour/audiofile_tagger.h
+++ b/libs/ardour/ardour/audiofile_tagger.h
@@ -23,9 +23,9 @@
#include <string>
-#include "taglib/tag.h"
-#include "taglib/taglib.h"
-#include "taglib/xiphcomment.h"
+#include <taglib/tag.h>
+#include <taglib/taglib.h>
+#include <taglib/xiphcomment.h>
#include "ardour/libardour_visibility.h"
diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h
index 479d739be0..a8cc880024 100644
--- a/libs/ardour/ardour/buffer.h
+++ b/libs/ardour/ardour/buffer.h
@@ -81,8 +81,8 @@ public:
virtual void merge_from (const Buffer& src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) = 0;
protected:
- Buffer(DataType type, size_t capacity)
- : _type(type), _capacity(capacity), _size(0), _silent(true)
+ Buffer(DataType type)
+ : _type(type), _capacity(0), _size(0), _silent (true)
{}
DataType _type;
diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h
index e99d6bf499..85a8a15e21 100644
--- a/libs/ardour/ardour/midi_ui.h
+++ b/libs/ardour/ardour/midi_ui.h
@@ -52,8 +52,6 @@ class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest>
static MidiControlUI* instance() { return _instance; }
- static BaseUI::RequestType PortChange;
-
void change_midi_ports ();
protected:
@@ -64,7 +62,6 @@ class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest>
typedef std::list<GSource*> PortSources;
PortSources port_sources;
ARDOUR::Session& _session;
- PBD::ScopedConnection rebind_connection;
bool midi_input_handler (Glib::IOCondition, AsyncMIDIPort*);
void reset_ports ();
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 7043460d52..a69b87efbd 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -97,12 +97,23 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
struct ParameterDescriptor {
- /* XXX: it would probably be nice if this initialised everything */
ParameterDescriptor ()
- : enumeration (false)
+ : integer_step(false)
+ , toggled (false)
+ , logarithmic (false)
+ , sr_dependent (false)
+ , lower (0)
+ , upper (0)
+ , step (0)
+ , smallstep (0)
+ , largestep (0)
+ , min_unbound (0)
+ , max_unbound (0)
+ , enumeration (false)
+ , midinote(false)
{}
- /* essentially a union of LADSPA and VST info */
+ /* essentially a union of LADSPA, VST and LV2 info */
bool integer_step;
bool toggled;
@@ -117,6 +128,7 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
bool min_unbound;
bool max_unbound;
bool enumeration;
+ bool midinote; ///< only used if integer_step is also true
};
XMLNode& get_state ();
diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h
index 16d3da3576..62996b7cdf 100644
--- a/libs/ardour/ardour/port_engine.h
+++ b/libs/ardour/ardour/port_engine.h
@@ -118,10 +118,11 @@ class LIBARDOUR_API PortEngine {
* does not exist, return an empty string.
*/
virtual std::string get_port_name (PortHandle) const = 0;
+
/** Return a reference to a port with the fullname @param name. Return
- * a null pointer if no such port exists.
+ * an "empty" PortHandle (analogous to a null pointer) if no such port exists.
*/
- virtual PortHandle* get_port_by_name (const std::string&) const = 0;
+ virtual PortHandle get_port_by_name (const std::string&) const = 0;
/** Find the set of ports whose names, types and flags match
* specified values, place the names of each port into @param ports,
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index 3c11304fdb..e1f8b42914 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -173,7 +173,6 @@ CONFIG_VARIABLE (bool, use_overlap_equivalency, "use-overlap-equivalency", false
CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true)
CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120)
CONFIG_VARIABLE (float, automation_interval_msecs, "automation-interval-msecs", 30)
-CONFIG_VARIABLE (bool, sync_all_route_ordering, "sync-all-route-ordering", true)
CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", false)
CONFIG_VARIABLE (bool, keep_tearoffs, "keep-tearoffs", false)
CONFIG_VARIABLE (bool, new_plugins_active, "new-plugins-active", true)
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index a7eeace7b4..fb2b18f177 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -102,10 +102,9 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
bool set_name (const std::string& str);
static void set_name_in_state (XMLNode &, const std::string &);
- uint32_t order_key (RouteSortOrderKey) const;
- bool has_order_key (RouteSortOrderKey) const;
- void set_order_key (RouteSortOrderKey, uint32_t);
- void sync_order_keys (RouteSortOrderKey);
+ uint32_t order_key () const;
+ bool has_order_key () const;
+ void set_order_key (uint32_t);
bool is_auditioner() const { return _flags & Auditioner; }
bool is_master() const { return _flags & MasterOut; }
@@ -427,7 +426,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
void set_remote_control_id (uint32_t id, bool notify_class_listeners = true);
uint32_t remote_control_id () const;
- void set_remote_control_id_from_order_key (RouteSortOrderKey, uint32_t order_key);
+ void set_remote_control_id_explicit (uint32_t order_key);
/* for things concerned about *this* route's RID */
@@ -436,7 +435,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
/* for things concerned about *any* route's RID changes */
static PBD::Signal0<void> RemoteControlIDChange;
- static PBD::Signal1<void,RouteSortOrderKey> SyncOrderKeys;
+ static PBD::Signal0<void> SyncOrderKeys;
bool has_external_redirects() const;
@@ -547,8 +546,8 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
int set_state_2X (const XMLNode&, int);
void set_processor_state_2X (XMLNodeList const &, int);
- typedef std::map<RouteSortOrderKey,uint32_t> OrderKeys;
- OrderKeys order_keys;
+ uint32_t _order_key;
+ bool _has_order_key;
uint32_t _remote_control_id;
void input_change_handler (IOChange, void *src);
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 5b0cf755a7..ade8fa7904 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -36,6 +36,8 @@
#include <glibmm/threads.h>
+#include <ltc/ltc.h>
+
#include "pbd/error.h"
#include "pbd/event_loop.h"
#include "pbd/rcu.h"
@@ -48,7 +50,6 @@
#include "midi++/types.h"
#include "timecode/time.h"
-#include "ltc/ltc.h"
#include "ardour/ardour.h"
#include "ardour/chan_count.h"
@@ -241,8 +242,9 @@ class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, pu
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
};
+ void set_order_hint (uint32_t order_hint) {_order_hint = order_hint;};
void notify_remote_id_change ();
- void sync_order_keys (RouteSortOrderKey);
+ void sync_order_keys ();
template<class T> void foreach_route (T *obj, void (T::*func)(Route&));
template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>));
@@ -502,7 +504,7 @@ class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, pu
void timecode_time_subframes (framepos_t when, Timecode::Time&);
void timecode_duration (framecnt_t, Timecode::Time&) const;
- void timecode_duration_string (char *, framecnt_t) const;
+ void timecode_duration_string (char *, size_t len, framecnt_t) const;
framecnt_t convert_to_frames (AnyTime const & position);
framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
@@ -1594,6 +1596,7 @@ class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, pu
GraphEdges _current_route_graph;
uint32_t next_control_id () const;
+ uint32_t _order_hint;
bool ignore_route_processor_changes;
MidiClockTicker* midi_clock;
@@ -1610,7 +1613,7 @@ class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, pu
void setup_ltc ();
void setup_click ();
- void setup_click_state (const XMLNode&);
+ void setup_click_state (const XMLNode*);
void setup_bundles ();
static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
diff --git a/libs/ardour/ardour/session_configuration_vars.h b/libs/ardour/ardour/session_configuration_vars.h
index 5e93c01b79..6349692e77 100644
--- a/libs/ardour/ardour/session_configuration_vars.h
+++ b/libs/ardour/ardour/session_configuration_vars.h
@@ -63,5 +63,6 @@ CONFIG_VARIABLE (bool, show_midi_on_meterbridge, "show-midi-on-meterbridge", tru
CONFIG_VARIABLE (bool, show_rec_on_meterbridge, "show-rec-on-meterbridge", true)
CONFIG_VARIABLE (bool, show_mute_on_meterbridge, "show-mute-on-meterbridge", false)
CONFIG_VARIABLE (bool, show_solo_on_meterbridge, "show-solo-on-meterbridge", false)
+CONFIG_VARIABLE (bool, show_monitor_on_meterbridge, "show-monitor-on-meterbridge", false)
CONFIG_VARIABLE (bool, show_name_on_meterbridge, "show-name-on-meterbridge", true)
CONFIG_VARIABLE (uint32_t, meterbridge_label_height, "meterbridge-label-height", 0)
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index faeb3be357..8c50aea5d3 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -25,11 +25,11 @@
#include <glibmm/threads.h>
#include <jack/jack.h>
+#include <ltc/ltc.h>
#include "pbd/signals.h"
#include "timecode/time.h"
-#include "ltc/ltc.h"
#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index ee43d1f30f..91b8888f52 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -353,11 +353,6 @@ namespace ARDOUR {
PostFader
};
- enum RouteSortOrderKey {
- EditorSort,
- MixerSort
- };
-
enum MonitorModel {
HardwareMonitoring, ///< JACK does monitoring
SoftwareMonitoring, ///< Ardour does monitoring
@@ -419,8 +414,7 @@ namespace ARDOUR {
enum RemoteModel {
UserOrdered,
- MixerOrdered,
- EditorOrdered
+ MixerOrdered
};
enum CrossfadeModel {