summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/audio_backend.h93
-rw-r--r--libs/ardour/ardour/audio_buffer.h15
-rw-r--r--libs/ardour/ardour/audioengine.h3
-rw-r--r--libs/ardour/ardour/audiofile_tagger.h6
-rw-r--r--libs/ardour/ardour/buffer.h5
-rw-r--r--libs/ardour/ardour/buffer_set.h1
-rw-r--r--libs/ardour/ardour/control_protocol_manager.h6
-rw-r--r--libs/ardour/ardour/cycle_timer.h2
-rw-r--r--libs/ardour/ardour/filesystem_paths.h4
-rw-r--r--libs/ardour/ardour/iec1ppmdsp.h4
-rw-r--r--libs/ardour/ardour/iec2ppmdsp.h4
-rw-r--r--libs/ardour/ardour/kmeterdsp.h2
-rw-r--r--libs/ardour/ardour/libardour_visibility.h35
-rw-r--r--libs/ardour/ardour/midi_model.h2
-rw-r--r--libs/ardour/ardour/midi_ui.h3
-rw-r--r--libs/ardour/ardour/panner.h21
-rw-r--r--libs/ardour/ardour/panner_manager.h3
-rw-r--r--libs/ardour/ardour/panner_shell.h13
-rw-r--r--libs/ardour/ardour/plugin.h18
-rw-r--r--libs/ardour/ardour/plugin_insert.h3
-rw-r--r--libs/ardour/ardour/port_engine.h5
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h2
-rw-r--r--libs/ardour/ardour/route.h16
-rw-r--r--libs/ardour/ardour/session.h13
-rw-r--r--libs/ardour/ardour/session_configuration_vars.h1
-rw-r--r--libs/ardour/ardour/slave.h30
-rw-r--r--libs/ardour/ardour/types.h11
-rw-r--r--libs/ardour/ardour/utils.h1
-rw-r--r--libs/ardour/ardour/visibility.h74
-rw-r--r--libs/ardour/ardour/vumeterdsp.h4
30 files changed, 186 insertions, 214 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 175fc5bbf3..cdfd4971c8 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -32,14 +32,13 @@
#include "ardour/types.h"
#include "ardour/audioengine.h"
#include "ardour/port_engine.h"
-#include "ardour/visibility.h"
#ifdef ARDOURBACKEND_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them)
- #define ARDOURBACKEND_API LIBARDOUR_HELPER_DLL_EXPORT
+ #define ARDOURBACKEND_API LIBARDOUR_DLL_EXPORT
#else
- #define ARDOURBACKEND_API LIBARDOUR_HELPER_DLL_IMPORT
+ #define ARDOURBACKEND_API LIBARDOUR_DLL_IMPORT
#endif
-#define ARDOURBACKEND_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
+#define ARDOURBACKEND_LOCAL LIBARDOUR_DLL_LOCAL
namespace ARDOUR {
@@ -118,6 +117,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 +137,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 +282,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 +298,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 +333,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
@@ -349,7 +361,7 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
* Implementations can feel free to smooth the values returned over
* time (e.g. high pass filtering, or its equivalent).
*/
- virtual float cpu_load() const = 0;
+ virtual float dsp_load() const = 0;
/* Transport Control (JACK is the only audio API that currently offers
the concept of shared transport control)
@@ -458,8 +470,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..a32e679b69 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -33,17 +33,7 @@ public:
AudioBuffer(size_t capacity);
~AudioBuffer();
- void silence (framecnt_t len, framecnt_t offset = 0) {
- if (!_silent) {
- assert(_capacity > 0);
- assert(offset + len <= _capacity);
- memset(_data + offset, 0, sizeof (Sample) * len);
- if (len == _capacity) {
- _silent = true;
- }
- }
- _written = true;
- }
+ void silence (framecnt_t len, framecnt_t offset = 0);
/** Read @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
void read_from (const Sample* src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
@@ -204,10 +194,11 @@ public:
Sample* data (framecnt_t offset = 0) {
assert(offset <= _capacity);
+ _silent = false;
return _data + offset;
}
- bool check_silence (pframes_t, pframes_t&) const;
+ bool check_silence (pframes_t, bool, 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..75954e6ca9 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -86,9 +86,8 @@ 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 ;
+ float get_dsp_load() const ;
void transport_start ();
void transport_stop ();
TransportState transport_state ();
diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h
index 0c551ecbc9..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/toolkit/taglib.h"
-#include "taglib/ogg/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..d6f333a5a1 100644
--- a/libs/ardour/ardour/buffer.h
+++ b/libs/ardour/ardour/buffer.h
@@ -62,7 +62,6 @@ public:
DataType type() const { return _type; }
bool silent() const { return _silent; }
- void set_is_silent(bool yn) { _silent = yn; }
/** Reallocate the buffer used internally to handle at least @a size_t units of data.
*
@@ -81,8 +80,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/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 617feae269..34e26d5b3a 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -87,7 +87,6 @@ public:
const ChanCount& count() const { return _count; }
ChanCount& count() { return _count; }
- void set_is_silent(bool yn);
void silence (framecnt_t nframes, framecnt_t offset);
bool is_mirror() const { return _is_mirror; }
diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h
index 98494476f9..0c8c9014f0 100644
--- a/libs/ardour/ardour/control_protocol_manager.h
+++ b/libs/ardour/ardour/control_protocol_manager.h
@@ -65,8 +65,8 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
void load_mandatory_protocols ();
void midi_connectivity_established ();
- ControlProtocol* instantiate (ControlProtocolInfo&);
- int teardown (ControlProtocolInfo&);
+ int activate (ControlProtocolInfo&);
+ int deactivate (ControlProtocolInfo&);
std::list<ControlProtocolInfo*> control_protocol_info;
@@ -89,6 +89,8 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
int control_protocol_discover (std::string path);
ControlProtocolDescriptor* get_descriptor (std::string path);
ControlProtocolInfo* cpi_by_name (std::string);
+ ControlProtocol* instantiate (ControlProtocolInfo&);
+ int teardown (ControlProtocolInfo&);
};
} // namespace
diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h
index 0335375c8a..cab389ee69 100644
--- a/libs/ardour/ardour/cycle_timer.h
+++ b/libs/ardour/ardour/cycle_timer.h
@@ -49,6 +49,8 @@ class LIBARDOUR_API CycleTimer {
}
_entry = get_cycles();
}
+#else
+ (void) name;
#endif
}
diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h
index b96cd05137..0bf25c5153 100644
--- a/libs/ardour/ardour/filesystem_paths.h
+++ b/libs/ardour/ardour/filesystem_paths.h
@@ -43,14 +43,14 @@ namespace ARDOUR {
* @return the search path to be used when looking for per-system
* configuration files. This may include user configuration files.
*/
- LIBARDOUR_API PBD::SearchPath ardour_config_search_path ();
+ LIBARDOUR_API PBD::Searchpath ardour_config_search_path ();
/**
* @return the search path to be used when looking for data files
* that could be shared by systems (h/w and configuration independent
* files, such as icons, XML files, etc)
*/
- LIBARDOUR_API PBD::SearchPath ardour_data_search_path ();
+ LIBARDOUR_API PBD::Searchpath ardour_data_search_path ();
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/iec1ppmdsp.h b/libs/ardour/ardour/iec1ppmdsp.h
index 3e0637716d..b6f1501db7 100644
--- a/libs/ardour/ardour/iec1ppmdsp.h
+++ b/libs/ardour/ardour/iec1ppmdsp.h
@@ -29,11 +29,11 @@ public:
Iec1ppmdsp (void);
~Iec1ppmdsp (void);
- void process (float *p, int n);
+ void process (float const *p, int n);
float read (void);
void reset ();
- static void init (float fsamp);
+ static void init (float fsamp);
private:
diff --git a/libs/ardour/ardour/iec2ppmdsp.h b/libs/ardour/ardour/iec2ppmdsp.h
index aa5a90cdb9..6a3852da1d 100644
--- a/libs/ardour/ardour/iec2ppmdsp.h
+++ b/libs/ardour/ardour/iec2ppmdsp.h
@@ -29,11 +29,11 @@ public:
Iec2ppmdsp (void);
~Iec2ppmdsp (void);
- void process (float *p, int n);
+ void process (float const *p, int n);
float read (void);
void reset ();
- static void init (float fsamp);
+ static void init (float fsamp);
private:
diff --git a/libs/ardour/ardour/kmeterdsp.h b/libs/ardour/ardour/kmeterdsp.h
index 374afff50e..7fe2b9d11b 100644
--- a/libs/ardour/ardour/kmeterdsp.h
+++ b/libs/ardour/ardour/kmeterdsp.h
@@ -29,7 +29,7 @@ public:
Kmeterdsp (void);
~Kmeterdsp (void);
- void process (float *p, int n);
+ void process (float const *p, int n);
float read ();
void reset ();
diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h
index ed5cacf261..917307732c 100644
--- a/libs/ardour/ardour/libardour_visibility.h
+++ b/libs/ardour/ardour/libardour_visibility.h
@@ -20,37 +20,26 @@
#ifndef __libardour_libardour_visibility_h__
#define __libardour_libardour_visibility_h__
-/* _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.
- */
-
-#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
+#if defined(COMPILER_MSVC)
#define LIBARDOUR_DLL_IMPORT __declspec(dllimport)
#define LIBARDOUR_DLL_EXPORT __declspec(dllexport)
#define LIBARDOUR_DLL_LOCAL
#else
- #if __GNUC__ >= 4
- #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default")))
- #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default")))
- #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden")))
- #else
- #define LIBARDOUR_DLL_IMPORT
- #define LIBARDOUR_DLL_EXPORT
- #define LIBARDOUR_DLL_LOCAL
- #endif
+ #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden")))
#endif
-#ifdef LIBARDOUR_DLL // libardour is a DLL
-#ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it)
- #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT
-#else
- #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT
-#endif
-#define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL
-#else /* static lib, not DLL */
+#ifdef LIBARDOUR_STATIC // libardour is not a DLL
#define LIBARDOUR_API
#define LIBARDOUR_LOCAL
+#else
+ #ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it)
+ #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT
+ #else
+ #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT
+ #endif
+ #define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL
#endif
#endif /* __libardour_libardour_visibility_h__ */
diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h
index 98743969f7..e76a993b41 100644
--- a/libs/ardour/ardour/midi_model.h
+++ b/libs/ardour/ardour/midi_model.h
@@ -222,6 +222,8 @@ public:
uint8_t new_program;
int new_bank;
};
+
+ Change() : patch_id (-1) {}
};
typedef std::list<Change> ChangeList;
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/panner.h b/libs/ardour/ardour/panner.h
index 7dd9de6e0a..48f583c185 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -34,14 +34,18 @@
#include "ardour/types.h"
#include "ardour/automation_control.h"
#include "ardour/automatable.h"
-#include "ardour/visibility.h"
-#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them)
- #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_EXPORT
-#else
- #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_IMPORT
-#endif
-#define ARDOURPANNER_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
+
+/* This section is for actual panners to use. They will include this file,
+ * declare ARDOURPANNER_DLL_EXPORTS during compilation, and ... voila.
+ */
+
+#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building a panner implementation
+ #define ARDOURPANNER_API LIBARDOUR_DLL_EXPORT
+ #else
+ #define ARDOURPANNER_API LIBARDOUR_DLL_IMPORT
+ #endif
+#define ARDOURPANNER_LOCAL LIBARDOUR_DLL_LOCAL
namespace ARDOUR {
@@ -183,8 +187,11 @@ protected:
extern "C" {
struct LIBARDOUR_API PanPluginDescriptor {
std::string name;
+ std::string panner_uri;
+ std::string gui_uri;
int32_t in;
int32_t out;
+ uint32_t priority;
ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
};
}
diff --git a/libs/ardour/ardour/panner_manager.h b/libs/ardour/ardour/panner_manager.h
index 1db4a27e52..80f8e8010a 100644
--- a/libs/ardour/ardour/panner_manager.h
+++ b/libs/ardour/ardour/panner_manager.h
@@ -50,7 +50,8 @@ public:
void discover_panners ();
std::list<PannerInfo*> panner_info;
- PannerInfo* select_panner (ChanCount in, ChanCount out);
+ PannerInfo* select_panner (ChanCount in, ChanCount out, std::string const uri = "");
+ PannerInfo* get_by_uri (std::string uri);
private:
PannerManager();
diff --git a/libs/ardour/ardour/panner_shell.h b/libs/ardour/ardour/panner_shell.h
index b78573212a..76df20489f 100644
--- a/libs/ardour/ardour/panner_shell.h
+++ b/libs/ardour/ardour/panner_shell.h
@@ -37,6 +37,7 @@
namespace ARDOUR {
class Session;
+class Route;
class Panner;
class BufferSet;
class AudioBuffer;
@@ -71,11 +72,23 @@ public:
bool bypassed () const;
void set_bypassed (bool);
+ std::string current_panner_uri() const { return _current_panner_uri; }
+ std::string user_selected_panner_uri() const { return _user_selected_panner_uri; }
+ std::string panner_gui_uri() const { return _panner_gui_uri; }
+
private:
+ friend class Route;
void distribute_no_automation (BufferSet& src, BufferSet& dest, pframes_t nframes, gain_t gain_coeff);
+ bool set_user_selected_panner_uri (std::string const uri);
+
boost::shared_ptr<Panner> _panner;
boost::shared_ptr<Pannable> _pannable;
bool _bypassed;
+
+ std::string _current_panner_uri;
+ std::string _user_selected_panner_uri;
+ std::string _panner_gui_uri;
+ bool _force_reselect;
};
} // namespace ARDOUR
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/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index 51e1356d12..627c847513 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -123,8 +123,7 @@ class LIBARDOUR_API PluginInsert : public Processor
}
PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered;
- /** Emitted when the return value of splitting () has changed */
- PBD::Signal0<void> SplittingChanged;
+ PBD::Signal0<void> PluginIoReConfigure;
/** Enumeration of the ways in which we can match our insert's
* IO to that of the plugin(s).
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 7000dde3ca..23973f6a1a 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -155,6 +155,7 @@ CONFIG_VARIABLE (MeterLineUp, meter_line_up_din, "meter-line-up-din", MeteringLi
CONFIG_VARIABLE (float, meter_peak, "meter-peak", 0.0f)
CONFIG_VARIABLE (bool, meter_style_led, "meter-style-led", true)
CONFIG_VARIABLE (bool, show_editor_meter, "show-editor-meter", true)
+CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.0933967) /* units of dB */
/* miscellany */
@@ -173,7 +174,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..5cd17ee24e 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; }
@@ -257,6 +256,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0, bool need_process_lock = true);
int remove_processors (const ProcessorList&, ProcessorStreams* err = 0);
int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);
+ void set_custom_panner_uri (std::string const panner_uri);
void disable_processors (Placement);
void disable_processors ();
void disable_plugins (Placement);
@@ -427,7 +427,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 +436,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 +547,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 381f9fbf4b..08f4c1315a 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -36,6 +36,8 @@
#include <glibmm/threads.h>
+#include <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"
@@ -140,7 +141,7 @@ class WindowsVSTPlugin;
extern void setup_enum_writer ();
-class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
+class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
{
public:
enum RecordState {
@@ -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..7e80055f94 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.h>
#include "pbd/signals.h"
#include "timecode/time.h"
-#include "ltc/ltc.h"
#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
@@ -184,12 +184,14 @@ class LIBARDOUR_API Slave {
class LIBARDOUR_API ISlaveSessionProxy {
public:
virtual ~ISlaveSessionProxy() {}
- virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
- virtual framecnt_t frame_rate() const { return 0; }
- virtual framepos_t audible_frame () const { return 0; }
- virtual framepos_t transport_frame () const { return 0; }
- virtual pframes_t frames_since_cycle_start () const { return 0; }
- virtual framepos_t frame_time () const { return 0; }
+ virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
+ virtual framecnt_t frame_rate() const { return 0; }
+ virtual pframes_t frames_per_cycle() const { return 0; }
+ virtual framepos_t audible_frame () const { return 0; }
+ virtual framepos_t transport_frame () const { return 0; }
+ virtual pframes_t frames_since_cycle_start () const { return 0; }
+ virtual pframes_t sample_time_at_cycle_start() const { return 0; }
+ virtual framepos_t frame_time () const { return 0; }
virtual void request_locate (framepos_t /*frame*/, bool with_roll = false) {
(void) with_roll;
@@ -205,12 +207,14 @@ class LIBARDOUR_API SlaveSessionProxy : public ISlaveSessionProxy {
public:
SlaveSessionProxy(Session &s) : session(s) {}
- TempoMap& tempo_map() const;
- framecnt_t frame_rate() const;
- framepos_t audible_frame () const;
- framepos_t transport_frame () const;
- pframes_t frames_since_cycle_start () const;
- framepos_t frame_time () const;
+ TempoMap& tempo_map() const;
+ framecnt_t frame_rate() const;
+ pframes_t frames_per_cycle() const;
+ framepos_t audible_frame () const;
+ framepos_t transport_frame () const;
+ pframes_t frames_since_cycle_start () const;
+ pframes_t sample_time_at_cycle_start() const;
+ framepos_t frame_time () const;
void request_locate (framepos_t frame, bool with_roll = false);
void request_transport_speed (double speed);
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index ee43d1f30f..50a96030b1 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -187,7 +187,8 @@ namespace ARDOUR {
MeterIEC1NOR = 0x080,
MeterIEC2BBC = 0x100,
MeterIEC2EBU = 0x200,
- MeterVU = 0x400
+ MeterVU = 0x400,
+ MeterK12 = 0x800
};
enum TrackMode {
@@ -353,11 +354,6 @@ namespace ARDOUR {
PostFader
};
- enum RouteSortOrderKey {
- EditorSort,
- MixerSort
- };
-
enum MonitorModel {
HardwareMonitoring, ///< JACK does monitoring
SoftwareMonitoring, ///< Ardour does monitoring
@@ -419,8 +415,7 @@ namespace ARDOUR {
enum RemoteModel {
UserOrdered,
- MixerOrdered,
- EditorOrdered
+ MixerOrdered
};
enum CrossfadeModel {
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index f0030557e9..6dba01c797 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -58,6 +58,7 @@ static inline float f_max(float x, float a) {
LIBARDOUR_API std::string bump_name_once(const std::string& s, char delimiter);
LIBARDOUR_API int cmp_nocase (const std::string& s, const std::string& s2);
+LIBARDOUR_API int cmp_nocase_utf8 (const std::string& s1, const std::string& s2);
LIBARDOUR_API int touch_file(std::string path);
diff --git a/libs/ardour/ardour/visibility.h b/libs/ardour/ardour/visibility.h
deleted file mode 100644
index b702e94edb..0000000000
--- a/libs/ardour/ardour/visibility.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Copyright (C) 2013 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#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.
- */
-
-#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
- #define LIBARDOUR_HELPER_DLL_IMPORT __declspec(dllimport)
- #define LIBARDOUR_HELPER_DLL_EXPORT __declspec(dllexport)
- #define LIBARDOUR_HELPER_DLL_LOCAL
-#else
- #if __GNUC__ >= 4
- #define LIBARDOUR_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
- #define LIBARDOUR_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
- #define LIBARDOUR_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
- #else
- #define LIBARDOUR_HELPER_DLL_IMPORT
- #define LIBARDOUR_HELPER_DLL_EXPORT
- #define LIBARDOUR_HELPER_DLL_LOCAL
- #endif
-#endif
-
-#endif /* __libardour_visibility_h__ */
diff --git a/libs/ardour/ardour/vumeterdsp.h b/libs/ardour/ardour/vumeterdsp.h
index f8abc7fa93..1271276d68 100644
--- a/libs/ardour/ardour/vumeterdsp.h
+++ b/libs/ardour/ardour/vumeterdsp.h
@@ -29,11 +29,11 @@ public:
Vumeterdsp (void);
~Vumeterdsp (void);
- void process (float *p, int n);
+ void process (float const *p, int n);
float read (void);
void reset ();
- static void init (float fsamp);
+ static void init (float fsamp);
private: