summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-09-10 15:03:30 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-09-10 15:03:30 +0000
commit68e943265edf04e63a8e8b8f62bab20f99d9c637 (patch)
treeff8941a59662fc0c4622944b65f7b2d5e3bdd0c3 /libs/ardour/ardour
parente4372df05b7d74a6b80dbbf4b6c00cc2b31c4723 (diff)
merge from 2.0-ongoing @ 3581
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/ardour.h9
-rw-r--r--libs/ardour/ardour/audio_track.h4
-rw-r--r--libs/ardour/ardour/audio_unit.h40
-rw-r--r--libs/ardour/ardour/audioengine.h49
-rw-r--r--libs/ardour/ardour/auto_bundle.h2
-rw-r--r--libs/ardour/ardour/buffer.h2
-rw-r--r--libs/ardour/ardour/bundle.h5
-rw-r--r--libs/ardour/ardour/configuration_vars.h2
-rw-r--r--libs/ardour/ardour/io.h1
-rw-r--r--libs/ardour/ardour/meter.h1
-rw-r--r--libs/ardour/ardour/midi_track.h4
-rw-r--r--libs/ardour/ardour/onset_detector.h56
-rw-r--r--libs/ardour/ardour/osc.h21
-rw-r--r--libs/ardour/ardour/plugin.h27
-rw-r--r--libs/ardour/ardour/plugin_insert.h7
-rw-r--r--libs/ardour/ardour/plugin_manager.h25
-rw-r--r--libs/ardour/ardour/port.h2
-rw-r--r--libs/ardour/ardour/port_insert.h5
-rw-r--r--libs/ardour/ardour/processor.h5
-rw-r--r--libs/ardour/ardour/route.h8
-rw-r--r--libs/ardour/ardour/send.h9
-rw-r--r--libs/ardour/ardour/session.h39
-rw-r--r--libs/ardour/ardour/track.h4
-rw-r--r--libs/ardour/ardour/user_bundle.h2
24 files changed, 244 insertions, 85 deletions
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h
index fecd0fcf4e..fd873f9a6f 100644
--- a/libs/ardour/ardour/ardour.h
+++ b/libs/ardour/ardour/ardour.h
@@ -32,6 +32,8 @@
#include <ardour/configuration.h>
#include <ardour/types.h>
+// #include <jack/jack.h> need this to inline jack_get_microseconds
+
namespace MIDI {
class MachineControl;
class Port;
@@ -57,7 +59,12 @@ namespace ARDOUR {
const layer_t max_layer = UCHAR_MAX;
microseconds_t get_microseconds ();
-
+/* {
+ JACK has exported this functionality for a long time now
+ but inlining this causes problems
+ return (microseconds_t) jack_get_time();
+ }
+*/
Change new_change ();
extern Change StartChanged;
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index 3546545329..fe7dcb58ff 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -58,8 +58,8 @@ class AudioTrack : public Track
void freeze (InterThreadInfo&);
void unfreeze ();
- void bounce (InterThreadInfo&);
- void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
+ boost::shared_ptr<Region> bounce (InterThreadInfo&);
+ boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
int set_state(const XMLNode& node);
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h
index dc9a52d5d3..497954092f 100644
--- a/libs/ardour/ardour/audio_unit.h
+++ b/libs/ardour/ardour/audio_unit.h
@@ -100,11 +100,12 @@ class AUPlugin : public ARDOUR::Plugin
bool has_editor () const;
- bool fixed_io() const { return false; }
- int32_t can_support_input_configuration (int32_t in);
- int32_t compute_output_streams (int32_t nplugins);
- uint32_t output_streams() const;
- uint32_t input_streams() const;
+ bool reconfigurable_io() const { return true; }
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
+ int32_t count_for_configuration (const ChanCount& in, ChanCount out) const;
+ bool configure_io (ChanCount in, ChanCount& out);
+ ChanCount output_streams() const;
+ ChanCount input_streams() const;
boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
boost::shared_ptr<CAComponent> get_comp () const { return comp; }
@@ -118,18 +119,19 @@ class AUPlugin : public ARDOUR::Plugin
boost::shared_ptr<CAComponent> comp;
boost::shared_ptr<CAAudioUnit> unit;
- AudioStreamBasicDescription streamFormat;
bool initialized;
- int format_set;
+ int32_t input_channels;
+ int32_t output_channels;
+ std::vector<std::pair<int,int> > io_configs;
AudioBufferList* buffers;
UInt32 global_elements;
UInt32 output_elements;
UInt32 input_elements;
- int set_output_format ();
- int set_input_format ();
- int set_stream_format (int scope, uint32_t cnt);
+ int set_output_format (AudioStreamBasicDescription&);
+ int set_input_format (AudioStreamBasicDescription&);
+ int set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescription&);
int _set_block_size (nframes_t nframes);
void discover_parameters ();
@@ -142,10 +144,15 @@ class AUPlugin : public ARDOUR::Plugin
std::vector<AUParameterDescriptor> descriptors;
void init ();
+
};
typedef boost::shared_ptr<AUPlugin> AUPluginPtr;
+struct AUPluginCachedInfo {
+ std::vector<std::pair<int,int> > io_configs;
+};
+
class AUPluginInfo : public PluginInfo {
public:
AUPluginInfo (boost::shared_ptr<CAComponentDescription>);
@@ -153,16 +160,29 @@ class AUPluginInfo : public PluginInfo {
PluginPtr load (Session& session);
+ AUPluginCachedInfo cache;
+
static PluginInfoList discover ();
static void get_names (CAComponentDescription&, std::string& name, Glib::ustring& maker);
static std::string stringify_descriptor (const CAComponentDescription&);
+ static int load_cached_info ();
+
private:
boost::shared_ptr<CAComponentDescription> descriptor;
+ UInt32 version;
static void discover_music (PluginInfoList&);
static void discover_fx (PluginInfoList&);
static void discover_by_description (PluginInfoList&, CAComponentDescription&);
+ static Glib::ustring au_cache_path ();
+
+ typedef std::map<std::string,AUPluginCachedInfo> CachedInfoMap;
+ static CachedInfoMap cached_info;
+
+ static bool cached_io_configuration (const std::string&, UInt32, CAComponent&, AUPluginCachedInfo&, const std::string& name);
+ static void add_cached_info (const std::string&, AUPluginCachedInfo&);
+ static void save_cached_info ();
};
typedef boost::shared_ptr<AUPluginInfo> AUPluginInfoPtr;
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index e1d5e50cc2..89abc6669a 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -130,13 +130,13 @@ class AudioEngine : public sigc::trackable
const char ** get_ports (const std::string& port_name_pattern, const std::string& type_name_pattern, uint32_t flags);
- uint32_t n_physical_outputs () const;
- uint32_t n_physical_inputs () const;
-
bool can_request_hardware_monitoring ();
- void get_physical_outputs (std::vector<std::string>&);
- void get_physical_inputs (std::vector<std::string>&);
+ uint32_t n_physical_outputs (DataType type) const;
+ uint32_t n_physical_inputs (DataType type) const;
+
+ void get_physical_outputs (DataType type, std::vector<std::string>&);
+ void get_physical_inputs (DataType type, std::vector<std::string>&);
std::string get_nth_physical_output (DataType type, uint32_t n) {
return get_nth_physical (type, n, JackPortIsInput);
@@ -152,7 +152,7 @@ class AudioEngine : public sigc::trackable
/** Caller may not delete the object pointed to by the return value
*/
- Port *get_port_by_name (const std::string& name, bool keep = true) const;
+ Port *get_port_by_name (const std::string& name, bool keep = true);
enum TransportState {
TransportStopped = JackTransportStopped,
@@ -204,27 +204,28 @@ class AudioEngine : public sigc::trackable
std::string make_port_name_non_relative (std::string);
private:
- ARDOUR::Session *session;
- jack_client_t *_jack;
- std::string jack_client_name;
- mutable Glib::Mutex _process_lock;
- Glib::Cond session_removed;
- bool session_remove_pending;
- bool _running;
- bool _has_run;
- nframes_t _buffer_size;
- nframes_t _frame_rate;
+ ARDOUR::Session* session;
+ jack_client_t* _jack;
+ std::string jack_client_name;
+ Glib::Mutex _process_lock;
+ Glib::Cond session_removed;
+ bool session_remove_pending;
+ bool _running;
+ bool _has_run;
+ nframes_t _buffer_size;
+ nframes_t _frame_rate;
/// number of frames between each check for changes in monitor input
- nframes_t monitor_check_interval;
+ nframes_t monitor_check_interval;
/// time of the last monitor check in frames
- nframes_t last_monitor_check;
+ nframes_t last_monitor_check;
/// the number of frames processed since start() was called
- nframes_t _processed_frames;
- bool _freewheeling;
- bool _freewheel_thread_registered;
- sigc::slot<int,nframes_t> freewheel_action;
- bool reconnect_on_halt;
- int _usecs_per_cycle;
+ nframes_t _processed_frames;
+ bool _freewheeling;
+ bool _freewheel_pending;
+ bool _freewheel_thread_registered;
+ sigc::slot<int,nframes_t> freewheel_action;
+ bool reconnect_on_halt;
+ int _usecs_per_cycle;
SerializedRCUManager<Ports> ports;
diff --git a/libs/ardour/ardour/auto_bundle.h b/libs/ardour/ardour/auto_bundle.h
index 685a083e8d..9df26a449b 100644
--- a/libs/ardour/ardour/auto_bundle.h
+++ b/libs/ardour/ardour/auto_bundle.h
@@ -32,7 +32,7 @@ class AutoBundle : public Bundle {
AutoBundle (bool i = true);
AutoBundle (std::string const &, bool i = true);
- uint32_t nchannels () const;
+ ChanCount nchannels () const;
const PortList& channel_ports (uint32_t) const;
void set_channels (uint32_t);
diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h
index fd94360226..72df6c7fd6 100644
--- a/libs/ardour/ardour/buffer.h
+++ b/libs/ardour/ardour/buffer.h
@@ -21,8 +21,10 @@
#include <cstdlib>
#include <cassert>
+#include <cstring>
#include <iostream>
#include <boost/utility.hpp>
+
#include <ardour/types.h>
#include <ardour/data_type.h>
#include <ardour/runtime_functions.h>
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h
index ba92063b30..46ba13152e 100644
--- a/libs/ardour/ardour/bundle.h
+++ b/libs/ardour/ardour/bundle.h
@@ -22,7 +22,9 @@
#include <string>
#include <sigc++/signal.h>
+
#include "ardour/data_type.h"
+#include "ardour/chan_count.h"
namespace ARDOUR {
@@ -37,12 +39,13 @@ class Bundle {
Bundle () : _type (DataType::AUDIO) {}
Bundle (bool i) : _type (DataType::AUDIO), _ports_are_inputs (i) {}
Bundle (std::string const & n, bool i = true) : _name (n), _type (DataType::AUDIO), _ports_are_inputs (i) {}
+
virtual ~Bundle() {}
/**
* @return Number of channels that this Bundle has.
*/
- virtual uint32_t nchannels () const = 0;
+ virtual ChanCount nchannels () const = 0;
virtual const PortList& channel_ports (uint32_t) const = 0;
void set_name (std::string const & n) {
diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h
index 7a7a2ce419..1f455dc308 100644
--- a/libs/ardour/ardour/configuration_vars.h
+++ b/libs/ardour/ardour/configuration_vars.h
@@ -124,6 +124,7 @@ CONFIG_VARIABLE (bool, quieten_at_speed, "quieten-at-speed", true)
CONFIG_VARIABLE (bool, primary_clock_delta_edit_cursor, "primary-clock-delta-edit-cursor", false)
CONFIG_VARIABLE (bool, secondary_clock_delta_edit_cursor, "secondary-clock-delta-edit-cursor", false)
CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true)
+CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-sync", false)
/* timecode and sync */
@@ -159,6 +160,7 @@ CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", tru
CONFIG_VARIABLE (std::string, keyboard_layout, "keyboard-layout", "ansi")
CONFIG_VARIABLE (std::string, default_bindings, "default-bindings", "ardour")
CONFIG_VARIABLE (bool, default_narrow_ms, "default-narrow_ms", false)
+CONFIG_VARIABLE (bool, name_new_markers, "name-new-markers", false)
CONFIG_VARIABLE (bool, rubberbanding_snaps_to_grid, "rubberbanding-snaps-to-grid", false)
CONFIG_VARIABLE (long, font_scale, "font-scale", 102400)
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 83b6378dae..b44e131d8a 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -368,6 +368,7 @@ class IO : public Automatable, public Latent
int create_ports (const XMLNode&);
int make_connections (const XMLNode&);
+ boost::shared_ptr<Bundle> find_possible_bundle (const string &desired_name, const string &default_name, const string &connection_type_name);
void setup_peak_meters ();
void meter ();
diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h
index e19c0a51ca..112f306ccb 100644
--- a/libs/ardour/ardour/meter.h
+++ b/libs/ardour/ardour/meter.h
@@ -40,6 +40,7 @@ public:
void reset ();
void reset_max ();
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const { return true; }
bool configure_io (ChanCount in, ChanCount out);
/** Compute peaks */
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 500502ac4b..6e4677df22 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -65,8 +65,8 @@ public:
void freeze (InterThreadInfo&);
void unfreeze ();
- void bounce (InterThreadInfo&);
- void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
+ boost::shared_ptr<Region> bounce (InterThreadInfo&);
+ boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
int set_state(const XMLNode& node);
diff --git a/libs/ardour/ardour/onset_detector.h b/libs/ardour/ardour/onset_detector.h
new file mode 100644
index 0000000000..9243653d94
--- /dev/null
+++ b/libs/ardour/ardour/onset_detector.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2008 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 __ardour_onset_detector_h__
+#define __ardour_onset_detector_h__
+
+#include <ardour/audioanalyser.h>
+
+namespace ARDOUR {
+
+class AudioSource;
+class Session;
+
+class OnsetDetector : public AudioAnalyser
+{
+
+ public:
+ OnsetDetector (float sample_rate);
+ ~OnsetDetector();
+
+ static std::string operational_identifier();
+
+ void set_silence_threshold (float);
+ void set_peak_threshold (float);
+ void set_function (int);
+
+ int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
+
+ static void cleanup_onsets (AnalysisFeatureList&, float sr, float gap_msecs);
+
+ protected:
+ AnalysisFeatureList* current_results;
+ int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
+
+ static std::string _op_id;
+};
+
+} /* namespace */
+
+#endif /* __ardour_audioanalyser_h__ */
diff --git a/libs/ardour/ardour/osc.h b/libs/ardour/ardour/osc.h
index 3f1ce03445..d7c2f4bd85 100644
--- a/libs/ardour/ardour/osc.h
+++ b/libs/ardour/ardour/osc.h
@@ -54,12 +54,13 @@ class OSC : public BasicUI, public sigc::trackable
lo_server _osc_server;
lo_server _osc_unix_server;
std::string _osc_unix_socket_path;
- std::string _osc_url_file;
+ std::string _osc_url_file;
pthread_t _osc_thread;
int _request_pipe[2];
static void * _osc_receiver(void * arg);
void osc_receiver();
+ void send(); // This should accept an OSC payload
bool init_osc_thread ();
void terminate_osc_thread ();
@@ -69,6 +70,11 @@ class OSC : public BasicUI, public sigc::trackable
void session_going_away ();
+ // Handlers for "Application Hook" signals
+ void session_loaded( ARDOUR::Session& );
+ void session_exported( std::string, std::string );
+ // end "Application Hook" handles
+
std::string get_server_url ();
std::string get_unix_server_url ();
@@ -101,18 +107,19 @@ class OSC : public BasicUI, public sigc::trackable
PATH_CALLBACK(rec_enable_toggle);
PATH_CALLBACK(toggle_all_rec_enables);
-#define PATH_CALLBACK1(name,type) \
+#define PATH_CALLBACK1(name,type,optional) \
static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
} \
int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
- if (argc > 0) { \
- name (argv[0]->type); \
- }\
- return 0; \
+ if (argc > 0) { \
+ name (optional argv[0]->type); \
+ } \
+ return 0; \
}
- PATH_CALLBACK1(set_transport_speed,f);
+ PATH_CALLBACK1(set_transport_speed,f,);
+ PATH_CALLBACK1(access_action,s,&);
};
}
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 73f89f1a91..fec044e885 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -145,6 +145,33 @@ class Plugin : public PBD::StatefulDestructible, public Latent
virtual bool has_editor() const = 0;
+ sigc::signal<void,uint32_t,float> ParameterChanged;
+
+ /* NOTE: this block of virtual methods looks like the interface
+ to a Processor, but Plugin does not inherit from Processor.
+ It is therefore not required that these precisely match
+ the interface, but it is likely that they will evolve together.
+ */
+
+ /* this returns true if the plugin can change its inputs or outputs on demand.
+ LADSPA, LV2 and VST plugins cannot do this. AudioUnits can.
+ */
+
+ virtual bool reconfigurable_io() const { return false; }
+
+ /* this is only called if reconfigurable_io() returns true */
+ virtual bool configure_io (ChanCount in, ChanCount out) { return true; }
+
+ /* specific types of plugins can overload this. As of September 2008, only
+ AUPlugin does this.
+ */
+ virtual bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const { return false; }
+ virtual ChanCount output_streams() const;
+ virtual ChanCount input_streams() const;
+
+ PBD::Controllable *get_nth_control (uint32_t, bool do_not_create = false);
+ void make_nth_control (uint32_t, const XMLNode&);
+
PluginInfoPtr get_info() { return _info; }
void set_info (const PluginInfoPtr inf) { _info = inf; }
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index 42c53c487c..c19d113256 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -69,13 +69,12 @@ class PluginInsert : public Processor
bool set_count (uint32_t num);
uint32_t get_count () const { return _plugins.size(); }
- virtual bool can_support_input_configuration (ChanCount in) const;
- virtual ChanCount output_for_input_configuration (ChanCount in) const;
- virtual bool configure_io (ChanCount in, ChanCount out);
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
+ bool configure_io (ChanCount in, ChanCount out);
bool is_generator() const;
- void set_parameter (Parameter param, float val);
+ void set_parameter (Parameter param, float val);
float get_parameter (Parameter param);
float default_parameter_value (Parameter param);
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h
index 892c8bd75a..858decd0e5 100644
--- a/libs/ardour/ardour/plugin_manager.h
+++ b/libs/ardour/ardour/plugin_manager.h
@@ -23,6 +23,7 @@
#include <list>
#include <map>
#include <string>
+#include <set>
#include <ardour/types.h>
#include <ardour/plugin.h>
@@ -54,7 +55,31 @@ class PluginManager {
static PluginManager* the_manager() { return _manager; }
+ void load_favorites ();
+ void save_favorites ();
+ void add_favorite (ARDOUR::PluginType type, std::string unique_id);
+ void remove_favorite (ARDOUR::PluginType type, std::string unique_id);
+ bool is_a_favorite_plugin (const PluginInfoPtr&);
+
private:
+ struct FavoritePlugin {
+ ARDOUR::PluginType type;
+ std::string unique_id;
+
+ FavoritePlugin (ARDOUR::PluginType t, std::string id)
+ : type (t), unique_id (id) {}
+
+ bool operator==(const FavoritePlugin& other) const {
+ return other.type == type && other.unique_id == unique_id;
+ }
+
+ bool operator<(const FavoritePlugin& other) const {
+ return other.type < type || other.unique_id < unique_id;
+ }
+ };
+ typedef std::set<FavoritePlugin> FavoritePluginList;
+ FavoritePluginList favorites;
+
ARDOUR::PluginInfoList _vst_plugin_info;
ARDOUR::PluginInfoList _ladspa_plugin_info;
ARDOUR::PluginInfoList _lv2_plugin_info;
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index 93c34da16d..084022541d 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -23,7 +23,7 @@
#include <set>
#include <vector>
#include <string>
-
+#include <cstring>
#include <sigc++/signal.h>
#include <pbd/failed_constructor.h>
#include <ardour/ardour.h>
diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h
index 1743040bf5..72f02ff9c7 100644
--- a/libs/ardour/ardour/port_insert.h
+++ b/libs/ardour/ardour/port_insert.h
@@ -58,9 +58,8 @@ class PortInsert : public IOProcessor
ChanCount output_streams() const;
ChanCount input_streams() const;
- virtual bool can_support_input_configuration (ChanCount in) const;
- virtual ChanCount output_for_input_configuration (ChanCount in) const;
- virtual bool configure_io (ChanCount in, ChanCount out);
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const { return true; }
+ bool configure_io (ChanCount in, ChanCount out);
uint32_t bit_slot() const { return bitslot; }
diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h
index d3e95e8ebf..8c4ac8dfe5 100644
--- a/libs/ardour/ardour/processor.h
+++ b/libs/ardour/ardour/processor.h
@@ -80,7 +80,7 @@ class Processor : public Automatable, public Latent
virtual void activate () { _active = true; ActiveChanged.emit(); }
virtual void deactivate () { _active = false; ActiveChanged.emit(); }
- virtual bool configure_io (ChanCount in, ChanCount out) { _configured_input = in; return (_configured = true); }
+ virtual bool configure_io (ChanCount in, ChanCount out);
/* Derived classes should override these, or processor appears as an in-place pass-through */
@@ -91,8 +91,7 @@ class Processor : public Automatable, public Latent
* and write to their output parameter */
virtual bool is_out_of_place () const { return false; }
- virtual bool can_support_input_configuration (ChanCount in) const { return true; }
- virtual ChanCount output_for_input_configuration (ChanCount in) const { return in; }
+ virtual bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const = 0;
virtual ChanCount output_streams() const { return _configured_input; }
virtual ChanCount input_streams () const { return _configured_input; }
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index c7c0b77102..fb98cb57a7 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -359,8 +359,8 @@ class Route : public IO
void input_change_handler (IOChange, void *src);
void output_change_handler (IOChange, void *src);
- int reset_plugin_counts (ProcessorStreams*); /* locked */
- int _reset_plugin_counts (ProcessorStreams*); /* unlocked */
+ int reset_processor_counts (ProcessorStreams*); /* locked */
+ int _reset_processor_counts (ProcessorStreams*); /* unlocked */
/* processor I/O channels and plugin count handling */
@@ -372,8 +372,8 @@ class Route : public IO
ProcessorCount (boost::shared_ptr<ARDOUR::Processor> ins) : processor(ins) {}
};
- int32_t apply_some_plugin_counts (std::list<ProcessorCount>& iclist);
- bool check_some_plugin_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
+ int32_t apply_some_processor_counts (std::list<ProcessorCount>& iclist);
+ bool check_some_processor_counts (std::list<ProcessorCount>& iclist, ChanCount required_inputs, ProcessorStreams* err_streams);
void set_deferred_state ();
void add_processor_from_xml (const XMLNode&);
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index 1ee8bbceca..d5078bd7df 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -57,16 +57,17 @@ class Send : public IOProcessor
int set_state(const XMLNode& node);
uint32_t pans_required() const { return _configured_input.n_audio(); }
+ void expect_inputs (const ChanCount&);
- virtual bool can_support_input_configuration (ChanCount in) const;
- virtual ChanCount output_for_input_configuration (ChanCount in) const;
- virtual bool configure_io (ChanCount in, ChanCount out);
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
+ bool configure_io (ChanCount in, ChanCount out);
static uint32_t how_many_sends();
private:
bool _metering;
- uint32_t bitslot;
+ ChanCount expected_inputs;
+ uint32_t bitslot;
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 00cbc9922e..08315c3010 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -434,15 +434,18 @@ class Session : public PBD::StatefulDestructible
nframes_t worst_input_latency () const { return _worst_input_latency; }
nframes_t worst_track_latency () const { return _worst_track_latency; }
- int save_state (string snapshot_name, bool pending = false);
- int restore_state (string snapshot_name);
- int save_template (string template_name);
- int save_history (string snapshot_name = "");
- int restore_history (string snapshot_name);
- void remove_state (string snapshot_name);
- void rename_state (string old_name, string new_name);
+ int save_state (std::string snapshot_name, bool pending = false);
+ int restore_state (std::string snapshot_name);
+ int save_template (std::string template_name);
+ int save_history (std::string snapshot_name = "");
+ int restore_history (std::string snapshot_name);
+ void remove_state (std::string snapshot_name);
+ void rename_state (std::string old_name, std::string new_name);
void remove_pending_capture_state ();
+ static int rename_template (std::string old_name, std::string new_name);
+ static int delete_template (std::string name);
+
sigc::signal<void,string> StateSaved;
sigc::signal<void> StateReady;
@@ -579,7 +582,7 @@ class Session : public PBD::StatefulDestructible
sigc::signal<void,std::vector<boost::weak_ptr<Region> >& > RegionsAdded;
sigc::signal<void,boost::weak_ptr<Region> > RegionRemoved;
- int region_name (string& result, string base = string(""), bool newlevel = false) const;
+ int region_name (string& result, string base = string(""), bool newlevel = false);
string new_region_name (string);
string path_from_region_name (DataType type, string name, string identifier);
@@ -616,9 +619,11 @@ class Session : public PBD::StatefulDestructible
SlaveSource post_export_slave;
nframes_t post_export_position;
- int start_export (ARDOUR::ExportSpecification&);
- int stop_export (ARDOUR::ExportSpecification&);
- void finalize_audio_export ();
+ int pre_export ();
+ int start_export (ARDOUR::ExportSpecification&);
+ int stop_export (ARDOUR::ExportSpecification&);
+ void finalize_export ();
+ static sigc::signal<void, std::string, std::string> Exported;
void add_source (boost::shared_ptr<Source>);
void remove_source (boost::weak_ptr<Source>);
@@ -706,9 +711,8 @@ class Session : public PBD::StatefulDestructible
/* flattening stuff */
- int write_one_audio_track (AudioTrack&, nframes_t start, nframes_t cnt, bool overwrite,
- vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot);
-
+ boost::shared_ptr<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end, bool overwrite, vector<boost::shared_ptr<Source> >&,
+ InterThreadInfo& wot);
int freeze (InterThreadInfo&);
/* session-wide solo/mute/rec-enable */
@@ -910,7 +914,7 @@ class Session : public PBD::StatefulDestructible
void reset_playback_load_min ();
void reset_capture_load_min ();
- float read_data_rate () const;
+ float read_data_rate () const; // in usec
float write_data_rate () const;
/* ranges */
@@ -1072,6 +1076,7 @@ class Session : public PBD::StatefulDestructible
void set_slave_source (SlaveSource);
bool _exporting;
+
int prepare_to_export (ARDOUR::ExportSpecification&);
void prepare_diskstreams ();
@@ -1393,6 +1398,7 @@ class Session : public PBD::StatefulDestructible
void set_play_loop (bool yn);
void overwrite_some_buffers (Diskstream*);
void flush_all_inserts ();
+ int micro_locate (nframes_t distance);
void locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
void start_locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
void force_locate (nframes_t frame, bool with_roll = false);
@@ -1457,6 +1463,9 @@ class Session : public PBD::StatefulDestructible
/* REGION MANAGEMENT */
+ std::map<std::string,uint32_t> region_name_map;
+ void update_region_name_map (boost::shared_ptr<Region>);
+
mutable Glib::Mutex region_lock;
typedef map<PBD::ID,boost::shared_ptr<Region> > RegionList;
RegionList regions;
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 4d5545c0dc..fedd83ba68 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -76,8 +76,8 @@ class Track : public Route
virtual void freeze (InterThreadInfo&) = 0;
virtual void unfreeze () = 0;
- virtual void bounce (InterThreadInfo&) = 0;
- virtual void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&) = 0;
+ virtual boost::shared_ptr<Region> bounce (InterThreadInfo&) = 0;
+ virtual boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&) = 0;
XMLNode& get_state();
XMLNode& get_template();
diff --git a/libs/ardour/ardour/user_bundle.h b/libs/ardour/ardour/user_bundle.h
index 954e93d5d1..c33ddeaed9 100644
--- a/libs/ardour/ardour/user_bundle.h
+++ b/libs/ardour/ardour/user_bundle.h
@@ -35,7 +35,7 @@ class UserBundle : public Bundle, public PBD::Stateful {
UserBundle (std::string const &);
UserBundle (XMLNode const &, bool);
- uint32_t nchannels () const;
+ ChanCount nchannels () const;
const ARDOUR::PortList& channel_ports (uint32_t) const;
void add_channel ();