mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Part 1 of loading 2.X sessions; some things work, some things don't, hacks a-plenty.
LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE, MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION. So don't do that unless you make a backup of the session file first. git-svn-id: svn://localhost/ardour2/branches/3.0@5786 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
09efd82c6a
commit
79f91c7a20
131 changed files with 907 additions and 270 deletions
|
|
@ -2356,6 +2356,10 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ret = load_session (session_path, session_name, template_name);
|
ret = load_session (session_path, session_name, template_name);
|
||||||
|
if (!ARDOUR_COMMAND_LINE::immediate_save.empty()) {
|
||||||
|
session->save_state (ARDOUR_COMMAND_LINE::immediate_save, false);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1260,8 +1260,8 @@ AutomationLine::get_state (void)
|
||||||
return alist->get_state();
|
return alist->get_state();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AutomationLine::set_state (const XMLNode &node)
|
AutomationLine::set_state (const XMLNode &node, int version)
|
||||||
{
|
{
|
||||||
/* function as a proxy for the model */
|
/* function as a proxy for the model */
|
||||||
return alist->set_state (node);
|
return alist->set_state (node);
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
|
||||||
bool is_first_point (ControlPoint &);
|
bool is_first_point (ControlPoint &);
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
void set_colors();
|
void set_colors();
|
||||||
|
|
||||||
void modify_point_y (ControlPoint&, double);
|
void modify_point_y (ControlPoint&, double);
|
||||||
|
|
|
||||||
|
|
@ -865,7 +865,7 @@ AutomationTimeAxisView::color_handler ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AutomationTimeAxisView::set_state (const XMLNode& node)
|
AutomationTimeAxisView::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
TimeAxisView::set_state (node);
|
TimeAxisView::set_state (node);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||||
bool paste (nframes_t, float times, Selection&, size_t nth);
|
bool paste (nframes_t, float times, Selection&, size_t nth);
|
||||||
void reset_objects (PointSelection&);
|
void reset_objects (PointSelection&);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
||||||
void hide ();
|
void hide ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2226,7 +2226,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::set_state (const XMLNode& node)
|
Editor::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
XMLNode* geometry;
|
XMLNode* geometry;
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ class Editor : public PublicEditor
|
||||||
void redo (uint32_t n = 1);
|
void redo (uint32_t n = 1);
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode& );
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void set_mouse_mode (Editing::MouseMode, bool force=true);
|
void set_mouse_mode (Editing::MouseMode, bool force=true);
|
||||||
void step_mouse_mode (bool next);
|
void step_mouse_mode (bool next);
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ Keyboard::get_state (void)
|
||||||
return *node;
|
return *node;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Keyboard::set_state (const XMLNode& node)
|
Keyboard::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
~Keyboard ();
|
~Keyboard ();
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
typedef std::vector<uint32_t> State;
|
typedef std::vector<uint32_t> State;
|
||||||
typedef uint32_t ModifierMask;
|
typedef uint32_t ModifierMask;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ bool ARDOUR_COMMAND_LINE::try_hw_optimization = true;
|
||||||
string ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */
|
string ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */
|
||||||
Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus";
|
Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus";
|
||||||
bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false;
|
bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false;
|
||||||
|
string ARDOUR_COMMAND_LINE::immediate_save;
|
||||||
|
|
||||||
using namespace ARDOUR_COMMAND_LINE;
|
using namespace ARDOUR_COMMAND_LINE;
|
||||||
|
|
||||||
|
|
@ -51,7 +52,7 @@ print_help (const char *execname)
|
||||||
<< _(" -v, --version Show version information\n")
|
<< _(" -v, --version Show version information\n")
|
||||||
<< _(" -h, --help Print this message\n")
|
<< _(" -h, --help Print this message\n")
|
||||||
<< _(" -b, --bindings Print all possible keyboard binding names\n")
|
<< _(" -b, --bindings Print all possible keyboard binding names\n")
|
||||||
<< _(" -c, --name name Use a specific jack client name, default is ardour\n")
|
<< _(" -c, --name <name> Use a specific jack client name, default is ardour\n")
|
||||||
<< _(" -d, --disable-plugins Disable all plugins in an existing session\n")
|
<< _(" -d, --disable-plugins Disable all plugins in an existing session\n")
|
||||||
<< _(" -n, --show-splash Show splash screen\n")
|
<< _(" -n, --show-splash Show splash screen\n")
|
||||||
<< _(" -m, --menus file Use \"file\" for Ardour menus\n")
|
<< _(" -m, --menus file Use \"file\" for Ardour menus\n")
|
||||||
|
|
@ -61,6 +62,7 @@ print_help (const char *execname)
|
||||||
#ifdef VST_SUPPORT
|
#ifdef VST_SUPPORT
|
||||||
<< _(" -V, --novst Do not use VST support\n")
|
<< _(" -V, --novst Do not use VST support\n")
|
||||||
#endif
|
#endif
|
||||||
|
<< _(" -E, --save <file> Load the specified session, save it to <file> and then quit\n")
|
||||||
<< _(" [session-name] Name of session to load\n")
|
<< _(" [session-name] Name of session to load\n")
|
||||||
<< _(" -C, --curvetest filename Curve algorithm debugger\n")
|
<< _(" -C, --curvetest filename Curve algorithm debugger\n")
|
||||||
<< _(" -k, --keybindings filename Name of key bindings to load (default is ~/.ardour3/ardour.bindings)\n")
|
<< _(" -k, --keybindings filename Name of key bindings to load (default is ~/.ardour3/ardour.bindings)\n")
|
||||||
|
|
@ -71,9 +73,8 @@ print_help (const char *execname)
|
||||||
|
|
||||||
int
|
int
|
||||||
ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||||
|
|
||||||
{
|
{
|
||||||
const char *optstring = "U:hSbvVnOdc:C:m:N:k:p:";
|
const char *optstring = "U:hSbvVnOdc:C:m:N:k:p:E:";
|
||||||
const char *execname = strrchr (argv[0], '/');
|
const char *execname = strrchr (argv[0], '/');
|
||||||
|
|
||||||
if (getenv ("ARDOUR_SAE")) {
|
if (getenv ("ARDOUR_SAE")) {
|
||||||
|
|
@ -99,6 +100,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||||
{ "no-hw-optimizations", 0, 0, 'O' },
|
{ "no-hw-optimizations", 0, 0, 'O' },
|
||||||
{ "sync", 0, 0, 'S' },
|
{ "sync", 0, 0, 'S' },
|
||||||
{ "curvetest", 1, 0, 'C' },
|
{ "curvetest", 1, 0, 'C' },
|
||||||
|
{ "save", 1, 0, 'E' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -176,6 +178,10 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||||
keybindings_path = optarg;
|
keybindings_path = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'E':
|
||||||
|
immediate_save = optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return print_help(execname);
|
return print_help(execname);
|
||||||
}
|
}
|
||||||
|
|
@ -189,7 +195,6 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||||
session_name = argv[optind++];
|
session_name = argv[optind++];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ extern bool use_gtk_theme;
|
||||||
extern std::string keybindings_path;
|
extern std::string keybindings_path;
|
||||||
extern Glib::ustring menus_file;
|
extern Glib::ustring menus_file;
|
||||||
extern bool finder_invoked_ardour;
|
extern bool finder_invoked_ardour;
|
||||||
|
extern std::string immediate_save;
|
||||||
|
|
||||||
extern int32_t parse_opts (int argc, char *argv[]);
|
extern int32_t parse_opts (int argc, char *argv[]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ PannerUI::setup_pan ()
|
||||||
uint32_t const nouts = _panner->nouts();
|
uint32_t const nouts = _panner->nouts();
|
||||||
uint32_t const npans = _panner->npanners();
|
uint32_t const npans = _panner->npanners();
|
||||||
|
|
||||||
if (int32_t (nouts) == _current_nouts && npans == _current_npans) {
|
if (int32_t (nouts) == _current_nouts && int32_t (npans) == _current_npans) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ RouteTimeAxisView::automation_click ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
RouteTimeAxisView::set_state (const XMLNode& node)
|
RouteTimeAxisView::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
TimeAxisView::set_state (node);
|
TimeAxisView::set_state (node);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,9 @@ public:
|
||||||
void add_underlay (StreamView*, bool update_xml = true);
|
void add_underlay (StreamView*, bool update_xml = true);
|
||||||
void remove_underlay (StreamView*);
|
void remove_underlay (StreamView*);
|
||||||
void build_underlay_menu(Gtk::Menu*);
|
void build_underlay_menu(Gtk::Menu*);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
/* This is a bit nasty to expose :/ */
|
/* This is a bit nasty to expose :/ */
|
||||||
struct RouteAutomationNode {
|
struct RouteAutomationNode {
|
||||||
Evoral::Parameter param;
|
Evoral::Parameter param;
|
||||||
|
|
|
||||||
|
|
@ -1001,7 +1001,7 @@ TimeAxisView::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
TimeAxisView::set_state (const XMLNode& node)
|
TimeAxisView::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
|
||||||
virtual ~TimeAxisView ();
|
virtual ~TimeAxisView ();
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
/** @return index of this TimeAxisView within its parent */
|
/** @return index of this TimeAxisView within its parent */
|
||||||
int order () const { return _order; }
|
int order () const { return _order; }
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ UIConfiguration::get_variables (std::string which_node)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
UIConfiguration::set_state (const XMLNode& root)
|
UIConfiguration::set_state (const XMLNode& root, int version)
|
||||||
{
|
{
|
||||||
if (root.name() != "Ardour") {
|
if (root.name() != "Ardour") {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class UIConfiguration : public PBD::Stateful
|
||||||
int save_state ();
|
int save_state ();
|
||||||
int load_defaults ();
|
int load_defaults ();
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
XMLNode& get_variables (std::string);
|
XMLNode& get_variables (std::string);
|
||||||
void set_variables (const XMLNode&);
|
void set_variables (const XMLNode&);
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ Amp::state (bool full_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Amp::set_state (const XMLNode& node)
|
Amp::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public:
|
||||||
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
|
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
|
||||||
|
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
static void apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target);
|
static void apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target);
|
||||||
static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target);
|
static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class AudioDiskstream : public Diskstream
|
||||||
/* stateful */
|
/* stateful */
|
||||||
|
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode& node, int version = 3000);
|
||||||
|
|
||||||
void monitor_input (bool);
|
void monitor_input (bool);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class AudioTrack : public Track
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
|
AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
|
||||||
AudioTrack (Session&, const XMLNode&);
|
AudioTrack (Session&, const XMLNode&, int);
|
||||||
~AudioTrack ();
|
~AudioTrack ();
|
||||||
|
|
||||||
int set_mode (TrackMode m);
|
int set_mode (TrackMode m);
|
||||||
|
|
@ -55,12 +55,12 @@ class AudioTrack : public Track
|
||||||
boost::shared_ptr<Region> bounce (InterThreadInfo&);
|
boost::shared_ptr<Region> bounce (InterThreadInfo&);
|
||||||
boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
|
boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
|
||||||
|
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
|
|
||||||
int _set_state (const XMLNode&, bool call_base);
|
int _set_state (const XMLNode&, int, bool call_base);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int set_diskstream (boost::shared_ptr<AudioDiskstream>, void *);
|
int set_diskstream (boost::shared_ptr<AudioDiskstream>, void *);
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public:
|
||||||
int setup_peakfile ();
|
int setup_peakfile ();
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
bool can_truncate_peaks() const { return !destructive(); }
|
bool can_truncate_peaks() const { return !destructive(); }
|
||||||
bool can_be_analysed() const { return _length > 0; }
|
bool can_be_analysed() const { return _length > 0; }
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class AudioPlaylist : public ARDOUR::Playlist
|
||||||
|
|
||||||
nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
|
nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
sigc::signal<void,boost::shared_ptr<Crossfade> > NewCrossfade;
|
sigc::signal<void,boost::shared_ptr<Crossfade> > NewCrossfade;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ class AudioRegion : public Region
|
||||||
virtual nframes_t read_raw_internal (Sample*, sframes_t, nframes_t, int channel) const;
|
virtual nframes_t read_raw_internal (Sample*, sframes_t, nframes_t, int channel) const;
|
||||||
|
|
||||||
XMLNode& state (bool);
|
XMLNode& state (bool);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
static void set_default_fade (float steepness, nframes_t len);
|
static void set_default_fade (float steepness, nframes_t len);
|
||||||
bool fade_in_is_default () const;
|
bool fade_in_is_default () const;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class AudioSource : virtual public Source,
|
||||||
mutable sigc::signal<void,nframes_t,nframes_t> PeakRangeReady;
|
mutable sigc::signal<void,nframes_t,nframes_t> PeakRangeReady;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
int rename_peakfile (Glib::ustring newpath);
|
int rename_peakfile (Glib::ustring newpath);
|
||||||
void touch_peakfile ();
|
void touch_peakfile ();
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
|
||||||
void stop_touch ();
|
void stop_touch ();
|
||||||
bool touching() const { return _touching; }
|
bool touching() const { return _touching; }
|
||||||
|
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode &s);
|
int set_state (const XMLNode &, int version = 3000);
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
XMLNode& serialize_events ();
|
XMLNode& serialize_events ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class Configuration : public PBD::Stateful
|
||||||
virtual ~Configuration();
|
virtual ~Configuration();
|
||||||
|
|
||||||
virtual void map_parameters (sigc::slot<void, std::string> s) = 0;
|
virtual void map_parameters (sigc::slot<void, std::string> s) = 0;
|
||||||
virtual int set_state (XMLNode const &) = 0;
|
virtual int set_state (XMLNode const &, int) = 0;
|
||||||
virtual XMLNode & get_state () = 0;
|
virtual XMLNode & get_state () = 0;
|
||||||
virtual XMLNode & get_variables () = 0;
|
virtual XMLNode & get_variables () = 0;
|
||||||
virtual void set_variables (XMLNode const &) = 0;
|
virtual void set_variables (XMLNode const &) = 0;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ struct ControlProtocolInfo {
|
||||||
|
|
||||||
void set_protocol_states (const XMLNode&);
|
void set_protocol_states (const XMLNode&);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class Crossfade : public ARDOUR::AudioRegion
|
||||||
bool operator== (const ARDOUR::Crossfade&);
|
bool operator== (const ARDOUR::Crossfade&);
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::AudioRegion> in() const { return _in; }
|
boost::shared_ptr<ARDOUR::AudioRegion> in() const { return _in; }
|
||||||
boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
|
boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public:
|
||||||
static sigc::signal<void,nframes_t> CycleStart;
|
static sigc::signal<void,nframes_t> CycleStart;
|
||||||
|
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
/* Panning */
|
/* Panning */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ class Diskstream : public SessionObject, public boost::noncopyable
|
||||||
|
|
||||||
/* Stateful */
|
/* Stateful */
|
||||||
virtual XMLNode& get_state(void) = 0;
|
virtual XMLNode& get_state(void) = 0;
|
||||||
virtual int set_state(const XMLNode& node) = 0;
|
virtual int set_state(const XMLNode&, int version = 3000) = 0;
|
||||||
|
|
||||||
virtual void monitor_input (bool) {}
|
virtual void monitor_input (bool) {}
|
||||||
|
|
||||||
nframes_t capture_offset() const { return _capture_offset; }
|
nframes_t capture_offset() const { return _capture_offset; }
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public:
|
||||||
bool is_embedded () const { return _is_embedded; }
|
bool is_embedded () const { return _is_embedded; }
|
||||||
uint16_t channel() const { return _channel; }
|
uint16_t channel() const { return _channel; }
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
int set_source_name (const Glib::ustring& newname, bool destructive);
|
int set_source_name (const Glib::ustring& newname, bool destructive);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class InternalReturn : public Return
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state(bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
||||||
bool configure_io (ChanCount in, ChanCount out);
|
bool configure_io (ChanCount in, ChanCount out);
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ class InternalSend : public Send
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state(bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode& node, int version = 3000);
|
||||||
|
|
||||||
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
||||||
bool feeds (boost::shared_ptr<Route> other) const;
|
bool feeds (boost::shared_ptr<Route> other) const;
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,8 @@ class IO : public SessionObject, public Latent
|
||||||
|
|
||||||
virtual XMLNode& state (bool full);
|
virtual XMLNode& state (bool full);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
int set_state_2X (const XMLNode&, int, bool);
|
||||||
|
|
||||||
static int disable_connecting (void);
|
static int disable_connecting (void);
|
||||||
static int enable_connecting (void);
|
static int enable_connecting (void);
|
||||||
|
|
@ -156,6 +157,8 @@ class IO : public SessionObject, public Latent
|
||||||
static bool connecting_legal;
|
static bool connecting_legal;
|
||||||
|
|
||||||
XMLNode *pending_state_node;
|
XMLNode *pending_state_node;
|
||||||
|
int pending_state_node_version;
|
||||||
|
bool pending_state_node_in;
|
||||||
|
|
||||||
/* three utility functions - this just seems to be simplest place to put them */
|
/* three utility functions - this just seems to be simplest place to put them */
|
||||||
|
|
||||||
|
|
@ -203,9 +206,11 @@ class IO : public SessionObject, public Latent
|
||||||
void bundle_changed (Bundle::Change);
|
void bundle_changed (Bundle::Change);
|
||||||
|
|
||||||
|
|
||||||
int get_port_counts (const XMLNode& node, ChanCount& n, boost::shared_ptr<Bundle>& c);
|
int get_port_counts (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr<Bundle>& c);
|
||||||
int create_ports (const XMLNode&);
|
int get_port_counts_2X (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr<Bundle>& c);
|
||||||
int make_connections (const XMLNode&);
|
int create_ports (const XMLNode&, int version);
|
||||||
|
int make_connections (const XMLNode&, int, bool);
|
||||||
|
int make_connections_2X (const XMLNode &, int, bool);
|
||||||
|
|
||||||
boost::shared_ptr<Bundle> find_possible_bundle (const std::string &desired_name);
|
boost::shared_ptr<Bundle> find_possible_bundle (const std::string &desired_name);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ class IOProcessor : public Processor
|
||||||
sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
|
sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
|
||||||
|
|
||||||
XMLNode& state (bool full_state);
|
XMLNode& state (bool full_state);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
boost::shared_ptr<IO> _input;
|
boost::shared_ptr<IO> _input;
|
||||||
boost::shared_ptr<IO> _output;
|
boost::shared_ptr<IO> _output;
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ class LadspaPlugin : public ARDOUR::Plugin
|
||||||
bool parameter_is_toggled(uint32_t) const;
|
bool parameter_is_toggled(uint32_t) const;
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
int set_state(const XMLNode& node);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
bool save_preset(std::string name);
|
bool save_preset(std::string name);
|
||||||
|
|
||||||
bool has_editor() const { return false; }
|
bool has_editor() const { return false; }
|
||||||
|
|
@ -133,6 +133,7 @@ class LadspaPlugin : public ARDOUR::Plugin
|
||||||
void init (void *mod, uint32_t index, nframes_t rate);
|
void init (void *mod, uint32_t index, nframes_t rate);
|
||||||
void run_in_place (nframes_t nsamples);
|
void run_in_place (nframes_t nsamples);
|
||||||
void latency_compute_run ();
|
void latency_compute_run ();
|
||||||
|
int set_state_2X (const XMLNode&, int version = 3000);
|
||||||
};
|
};
|
||||||
|
|
||||||
class LadspaPluginInfo : public PluginInfo {
|
class LadspaPluginInfo : public PluginInfo {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class Location : public PBD::StatefulDestructible
|
||||||
}
|
}
|
||||||
|
|
||||||
Location (const Location& other);
|
Location (const Location& other);
|
||||||
Location (const XMLNode&);
|
Location (const XMLNode&, int version = 3000);
|
||||||
Location* operator= (const Location& other);
|
Location* operator= (const Location& other);
|
||||||
|
|
||||||
bool locked() const { return _locked; }
|
bool locked() const { return _locked; }
|
||||||
|
|
@ -125,7 +125,7 @@ class Location : public PBD::StatefulDestructible
|
||||||
XMLNode& cd_info_node (const std::string &, const std::string &);
|
XMLNode& cd_info_node (const std::string &, const std::string &);
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
@ -155,7 +155,7 @@ class Locations : public PBD::StatefulDestructible
|
||||||
void clear_ranges ();
|
void clear_ranges ();
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
Location *get_location_by_id(PBD::ID);
|
Location *get_location_by_id(PBD::ID);
|
||||||
|
|
||||||
Location* auto_loop_location () const;
|
Location* auto_loop_location () const;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class MidiDiskstream : public Diskstream
|
||||||
|
|
||||||
/* stateful */
|
/* stateful */
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void monitor_input (bool);
|
void monitor_input (bool);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ public:
|
||||||
|
|
||||||
void operator()();
|
void operator()();
|
||||||
void undo();
|
void undo();
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
void add(const boost::shared_ptr< Evoral::Note<TimeType> > note);
|
void add(const boost::shared_ptr< Evoral::Note<TimeType> > note);
|
||||||
|
|
@ -113,8 +113,8 @@ public:
|
||||||
|
|
||||||
void operator()();
|
void operator()();
|
||||||
void undo();
|
void undo();
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
|
void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public:
|
||||||
nframes_t read (MidiRingBuffer<nframes_t>& buf,
|
nframes_t read (MidiRingBuffer<nframes_t>& buf,
|
||||||
nframes_t start, nframes_t cnt, uint32_t chan_n=0);
|
nframes_t start, nframes_t cnt, uint32_t chan_n=0);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
bool destroy_region (boost::shared_ptr<Region>);
|
bool destroy_region (boost::shared_ptr<Region>);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class MidiRegion : public Region
|
||||||
NoteMode mode = Sustained) const;
|
NoteMode mode = Sustained) const;
|
||||||
|
|
||||||
XMLNode& state (bool);
|
XMLNode& state (bool);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
|
int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ class MidiSource : virtual public Source
|
||||||
mutable sigc::signal<void,sframes_t,nframes_t> ViewDataRangeReady;
|
mutable sigc::signal<void,sframes_t,nframes_t> ViewDataRangeReady;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
bool length_mutable() const { return true; }
|
bool length_mutable() const { return true; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class MidiTrack : public Track
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
|
MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
|
||||||
MidiTrack (Session&, const XMLNode&);
|
MidiTrack (Session&, const XMLNode&, int);
|
||||||
~MidiTrack ();
|
~MidiTrack ();
|
||||||
|
|
||||||
int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
||||||
|
|
@ -59,7 +59,7 @@ public:
|
||||||
boost::shared_ptr<Region> bounce_range (
|
boost::shared_ptr<Region> bounce_range (
|
||||||
nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
|
nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
|
||||||
|
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void midi_panic(void);
|
void midi_panic(void);
|
||||||
bool write_immediate_event(size_t size, const uint8_t* buf);
|
bool write_immediate_event(size_t size, const uint8_t* buf);
|
||||||
|
|
@ -92,8 +92,8 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
|
|
||||||
int _set_state (const XMLNode&, bool call_base);
|
int _set_state (const XMLNode&, int, bool call_base);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void write_out_of_band_data (
|
void write_out_of_band_data (
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ class MuteMaster : public AutomationControl
|
||||||
sigc::signal<void> MutePointChanged;
|
sigc::signal<void> MutePointChanged;
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AutomationList* _automation;
|
AutomationList* _automation;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ struct NamedSelection : public PBD::Stateful
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
static sigc::signal<void,NamedSelection*> NamedSelectionCreated;
|
static sigc::signal<void,NamedSelection*> NamedSelectionCreated;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
class Route;
|
|
||||||
class Session;
|
class Session;
|
||||||
class Panner;
|
class Panner;
|
||||||
class BufferSet;
|
class BufferSet;
|
||||||
|
|
@ -74,7 +73,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful
|
||||||
sigc::signal<void> Changed; /* for position */
|
sigc::signal<void> Changed; /* for position */
|
||||||
sigc::signal<void> StateChanged; /* for mute */
|
sigc::signal<void> StateChanged; /* for mute */
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
virtual XMLNode& state (bool full_state) = 0;
|
virtual XMLNode& state (bool full_state) = 0;
|
||||||
|
|
||||||
Panner & get_parent() { return parent; }
|
Panner & get_parent() { return parent; }
|
||||||
|
|
@ -149,9 +148,9 @@ class EqualPowerStereoPanner : public BaseStereoPanner
|
||||||
static StreamPanner* factory (Panner&, Evoral::Parameter param);
|
static StreamPanner* factory (Panner&, Evoral::Parameter param);
|
||||||
static std::string name;
|
static std::string name;
|
||||||
|
|
||||||
XMLNode& state (bool full_state);
|
XMLNode& state (bool full_state);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void update ();
|
void update ();
|
||||||
|
|
@ -172,7 +171,7 @@ class Multi2dPanner : public StreamPanner
|
||||||
|
|
||||||
XMLNode& state (bool full_state);
|
XMLNode& state (bool full_state);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
/* old school automation loading */
|
/* old school automation loading */
|
||||||
|
|
||||||
|
|
@ -229,7 +228,7 @@ public:
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
XMLNode& state (bool full);
|
XMLNode& state (bool full);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
static bool equivalent (pan_t a, pan_t b) {
|
static bool equivalent (pan_t a, pan_t b) {
|
||||||
return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
|
return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class Playlist : public SessionObject,
|
||||||
void foreach_region (sigc::slot<void, boost::shared_ptr<Region> >);
|
void foreach_region (sigc::slot<void, boost::shared_ptr<Region> >);
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_template ();
|
XMLNode& get_template ();
|
||||||
|
|
||||||
sigc::signal<void,bool> InUse;
|
sigc::signal<void,bool> InUse;
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,14 @@ class PluginInsert : public Processor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginInsert (Session&, boost::shared_ptr<Plugin>);
|
PluginInsert (Session&, boost::shared_ptr<Plugin>);
|
||||||
PluginInsert (Session&, const XMLNode&);
|
PluginInsert (Session&, const XMLNode&, int version = 3000);
|
||||||
~PluginInsert ();
|
~PluginInsert ();
|
||||||
|
|
||||||
static const std::string port_automation_node_name;
|
static const std::string port_automation_node_name;
|
||||||
|
|
||||||
XMLNode& state(bool);
|
XMLNode& state(bool);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode&);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void run (BufferSet& in, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void run (BufferSet& in, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
||||||
void silence (nframes_t nframes);
|
void silence (nframes_t nframes);
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@ class PortInsert : public IOProcessor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PortInsert (Session&, boost::shared_ptr<MuteMaster> mm);
|
PortInsert (Session&, boost::shared_ptr<MuteMaster> mm);
|
||||||
PortInsert (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&);
|
PortInsert (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&, int version = 3000);
|
||||||
~PortInsert ();
|
~PortInsert ();
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state(bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,8 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
|
||||||
|
|
||||||
virtual XMLNode& state (bool full);
|
virtual XMLNode& state (bool full);
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void *get_gui () const { return _gui; }
|
void *get_gui () const { return _gui; }
|
||||||
void set_gui (void *p) { _gui = p; }
|
void set_gui (void *p) { _gui = p; }
|
||||||
|
|
||||||
|
|
@ -109,6 +109,9 @@ protected:
|
||||||
ChanCount _configured_input;
|
ChanCount _configured_input;
|
||||||
ChanCount _configured_output;
|
ChanCount _configured_output;
|
||||||
void* _gui; /* generic, we don't know or care what this is */
|
void* _gui; /* generic, we don't know or care what this is */
|
||||||
|
|
||||||
|
private:
|
||||||
|
int set_state_2X (const XMLNode&, int version);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class RCConfiguration : public Configuration
|
||||||
RCConfiguration();
|
RCConfiguration();
|
||||||
|
|
||||||
void map_parameters (sigc::slot<void, std::string>);
|
void map_parameters (sigc::slot<void, std::string>);
|
||||||
int set_state (XMLNode const &);
|
int set_state (XMLNode const &, int version = 3000);
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
XMLNode& get_variables ();
|
XMLNode& get_variables ();
|
||||||
void set_variables (XMLNode const &);
|
void set_variables (XMLNode const &);
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ class Region
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
virtual XMLNode& state (bool);
|
virtual XMLNode& state (bool);
|
||||||
virtual int set_state (const XMLNode&);
|
virtual int set_state (const XMLNode&, int version = 3000);
|
||||||
virtual int set_live_state (const XMLNode&, Change&, bool send);
|
virtual int set_live_state (const XMLNode&, Change&, bool send);
|
||||||
|
|
||||||
virtual boost::shared_ptr<Region> get_parent() const;
|
virtual boost::shared_ptr<Region> get_parent() const;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state(bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
uint32_t pans_required() const { return _configured_input.n_audio(); }
|
uint32_t pans_required() const { return _configured_input.n_audio(); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
|
|
||||||
Route (Session&, std::string name, Flag flags = Flag(0),
|
Route (Session&, std::string name, Flag flags = Flag(0),
|
||||||
DataType default_type = DataType::AUDIO);
|
DataType default_type = DataType::AUDIO);
|
||||||
Route (Session&, const XMLNode&, DataType default_type = DataType::AUDIO);
|
Route (Session&, const XMLNode&, int, DataType default_type = DataType::AUDIO);
|
||||||
virtual ~Route();
|
virtual ~Route();
|
||||||
|
|
||||||
boost::shared_ptr<IO> input() const { return _input; }
|
boost::shared_ptr<IO> input() const { return _input; }
|
||||||
|
|
@ -251,7 +251,7 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
/* stateful */
|
/* stateful */
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
int set_state(const XMLNode& node);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
virtual XMLNode& get_template();
|
virtual XMLNode& get_template();
|
||||||
|
|
||||||
XMLNode& get_processor_state ();
|
XMLNode& get_processor_state ();
|
||||||
|
|
@ -384,8 +384,8 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
|
|
||||||
uint32_t pans_required() const;
|
uint32_t pans_required() const;
|
||||||
ChanCount n_process_buffers ();
|
ChanCount n_process_buffers ();
|
||||||
|
|
||||||
virtual int _set_state (const XMLNode&, bool call_base);
|
virtual int _set_state (const XMLNode&, int, bool call_base);
|
||||||
|
|
||||||
boost::shared_ptr<Amp> _amp;
|
boost::shared_ptr<Amp> _amp;
|
||||||
boost::shared_ptr<PeakMeter> _meter;
|
boost::shared_ptr<PeakMeter> _meter;
|
||||||
|
|
@ -393,6 +393,8 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init ();
|
void init ();
|
||||||
|
int _set_state_2X (const XMLNode&, int);
|
||||||
|
void set_processor_state_2X (XMLNodeList const &, int);
|
||||||
|
|
||||||
static uint32_t order_key_cnt;
|
static uint32_t order_key_cnt;
|
||||||
|
|
||||||
|
|
@ -407,7 +409,8 @@ class Route : public SessionObject, public AutomatableControls
|
||||||
int configure_processors (ProcessorStreams*);
|
int configure_processors (ProcessorStreams*);
|
||||||
int configure_processors_unlocked (ProcessorStreams*);
|
int configure_processors_unlocked (ProcessorStreams*);
|
||||||
|
|
||||||
bool add_processor_from_xml (const XMLNode&, ProcessorList::iterator iter);
|
bool add_processor_from_xml (const XMLNode&, ProcessorList::iterator iter);
|
||||||
|
bool add_processor_from_xml_2X (const XMLNode&, int, ProcessorList::iterator iter);
|
||||||
|
|
||||||
void placement_range (Placement p, ProcessorList::iterator& start, ProcessorList::iterator& end);
|
void placement_range (Placement p, ProcessorList::iterator& start, ProcessorList::iterator& end);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -130,9 +130,9 @@ public:
|
||||||
sigc::signal<void,void*> FlagsChanged;
|
sigc::signal<void,void*> FlagsChanged;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Session& _session;
|
Session& _session;
|
||||||
std::list<Route *> routes;
|
std::list<Route *> routes;
|
||||||
|
|
@ -142,6 +142,7 @@ private:
|
||||||
Property _properties;
|
Property _properties;
|
||||||
|
|
||||||
void remove_when_going_away (Route*);
|
void remove_when_going_away (Route*);
|
||||||
|
int set_state_2X (const XMLNode&, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace */
|
} /* namespace */
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class Send : public Delivery
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Send (Session&, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send);
|
Send (Session&, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send);
|
||||||
Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&, Delivery::Role r = Delivery::Send);
|
Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&, int version = 3000, Delivery::Role r = Delivery::Send);
|
||||||
virtual ~Send ();
|
virtual ~Send ();
|
||||||
|
|
||||||
uint32_t bit_slot() const { return _bitslot; }
|
uint32_t bit_slot() const { return _bitslot; }
|
||||||
|
|
@ -53,7 +53,7 @@ class Send : public Delivery
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state(bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state(void);
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
uint32_t pans_required() const { return _configured_input.n_audio(); }
|
uint32_t pans_required() const { return _configured_input.n_audio(); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
|
|
||||||
typedef std::list<boost::shared_ptr<Diskstream> > DiskstreamList;
|
typedef std::list<boost::shared_ptr<Diskstream> > DiskstreamList;
|
||||||
|
|
||||||
int load_routes (const XMLNode&);
|
int load_routes (const XMLNode&, int);
|
||||||
boost::shared_ptr<RouteList> get_routes() const {
|
boost::shared_ptr<RouteList> get_routes() const {
|
||||||
return routes.reader ();
|
return routes.reader ();
|
||||||
}
|
}
|
||||||
|
|
@ -468,7 +468,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
static std::vector<std::string*>* possible_states (std::string path);
|
static std::vector<std::string*>* possible_states (std::string path);
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
int set_state(const XMLNode& node); // not idempotent
|
int set_state(const XMLNode& node, int version = 3000); // not idempotent
|
||||||
XMLNode& get_template();
|
XMLNode& get_template();
|
||||||
|
|
||||||
/// The instant xml file is written to the session directory
|
/// The instant xml file is written to the session directory
|
||||||
|
|
@ -849,7 +849,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
public:
|
public:
|
||||||
GlobalRouteStateCommand (Session&, void*);
|
GlobalRouteStateCommand (Session&, void*);
|
||||||
GlobalRouteStateCommand (Session&, const XMLNode& node);
|
GlobalRouteStateCommand (Session&, const XMLNode& node);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -899,7 +899,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
void operator()();
|
void operator()();
|
||||||
void undo();
|
void undo();
|
||||||
XMLNode &get_state();
|
XMLNode &get_state();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
void mark();
|
void mark();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1439,7 +1439,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
|
|
||||||
/* edit/mix groups */
|
/* edit/mix groups */
|
||||||
|
|
||||||
int load_route_groups (const XMLNode&);
|
int load_route_groups (const XMLNode&, int);
|
||||||
|
|
||||||
std::list<RouteGroup *> _route_groups;
|
std::list<RouteGroup *> _route_groups;
|
||||||
|
|
||||||
|
|
@ -1458,7 +1458,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
|
||||||
void add_routes (RouteList&, bool save);
|
void add_routes (RouteList&, bool save);
|
||||||
uint32_t destructive_index;
|
uint32_t destructive_index;
|
||||||
|
|
||||||
boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&);
|
boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&, int);
|
||||||
|
|
||||||
/* mixer stuff */
|
/* mixer stuff */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public:
|
||||||
SessionConfiguration ();
|
SessionConfiguration ();
|
||||||
|
|
||||||
void map_parameters (sigc::slot<void, std::string>);
|
void map_parameters (sigc::slot<void, std::string>);
|
||||||
int set_state (XMLNode const &);
|
int set_state (XMLNode const &, int version = 3000);
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
XMLNode& get_variables ();
|
XMLNode& get_variables ();
|
||||||
void set_variables (XMLNode const &);
|
void set_variables (XMLNode const &);
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ class SessionMetadata : public PBD::StatefulDestructible
|
||||||
|
|
||||||
/*** Serialization ***/
|
/*** Serialization ***/
|
||||||
XMLNode & get_state ();
|
XMLNode & get_state ();
|
||||||
int set_state (const XMLNode &);
|
int set_state (const XMLNode &, int version = 3000);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public:
|
||||||
void mark_streaming_write_completed ();
|
void mark_streaming_write_completed ();
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void load_model (bool lock=true, bool force_reload=false);
|
void load_model (bool lock=true, bool force_reload=false);
|
||||||
void destroy_model ();
|
void destroy_model ();
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@ class Source : public SessionObject, public boost::noncopyable
|
||||||
virtual void session_saved() {}
|
virtual void session_saved() {}
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
bool destructive() const { return (_flags & Destructive); }
|
bool destructive() const { return (_flags & Destructive); }
|
||||||
bool writable () const { return (_flags & Writable); }
|
bool writable () const { return (_flags & Writable); }
|
||||||
virtual bool set_destructive (bool /*yn*/) { return false; }
|
virtual bool set_destructive (bool /*yn*/) { return false; }
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
void set_length (nframes_t frames);
|
void set_length (nframes_t frames);
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&, int version = 3000);
|
||||||
|
|
||||||
void dump (std::ostream&) const;
|
void dump (std::ostream&) const;
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ class Track : public Route
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
XMLNode& get_template();
|
XMLNode& get_template();
|
||||||
virtual int set_state(const XMLNode& node) = 0;
|
virtual int set_state (const XMLNode&, int version = 3000) = 0;
|
||||||
static void zero_diskstream_id_in_xml (XMLNode&);
|
static void zero_diskstream_id_in_xml (XMLNode&);
|
||||||
|
|
||||||
boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
|
boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
|
||||||
|
|
@ -96,7 +96,7 @@ class Track : public Route
|
||||||
sigc::signal<void> FreezeChange;
|
sigc::signal<void> FreezeChange;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Track (Session& sess, const XMLNode& node, DataType default_type = DataType::AUDIO);
|
Track (Session& sess, const XMLNode& node, int, DataType default_type = DataType::AUDIO);
|
||||||
|
|
||||||
virtual XMLNode& state (bool full) = 0;
|
virtual XMLNode& state (bool full) = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class UserBundle : public Bundle, public PBD::Stateful {
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int set_state (XMLNode const &);
|
int set_state (XMLNode const &, int version = 3000);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1909,7 +1909,7 @@ AudioDiskstream::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioDiskstream::set_state (const XMLNode& node)
|
AudioDiskstream::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
|
|
|
||||||
|
|
@ -558,7 +558,7 @@ AudioPlaylist::crossfade_invalidated (boost::shared_ptr<Region> r)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioPlaylist::set_state (const XMLNode& node)
|
AudioPlaylist::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNode *child;
|
XMLNode *child;
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,10 @@ AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode
|
||||||
use_new_diskstream ();
|
use_new_diskstream ();
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTrack::AudioTrack (Session& sess, const XMLNode& node)
|
AudioTrack::AudioTrack (Session& sess, const XMLNode& node, int version)
|
||||||
: Track (sess, node)
|
: Track (sess, node, version)
|
||||||
{
|
{
|
||||||
_set_state (node, false);
|
_set_state (node, version, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioTrack::~AudioTrack ()
|
AudioTrack::~AudioTrack ()
|
||||||
|
|
@ -233,19 +233,19 @@ AudioTrack::audio_diskstream() const
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioTrack::set_state (const XMLNode& node)
|
AudioTrack::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
return _set_state (node, true);
|
return _set_state (node, version, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioTrack::_set_state (const XMLNode& node, bool call_base)
|
AudioTrack::_set_state (const XMLNode& node, int version, bool call_base)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
XMLNodeConstIterator iter;
|
XMLNodeConstIterator iter;
|
||||||
|
|
||||||
if (call_base) {
|
if (call_base) {
|
||||||
if (Route::_set_state (node, call_base)) {
|
if (Route::_set_state (node, version, call_base)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ AudioTrackImporter::_move ()
|
||||||
|
|
||||||
XMLNode routes ("Routes");
|
XMLNode routes ("Routes");
|
||||||
routes.add_child_copy (xml_track);
|
routes.add_child_copy (xml_track);
|
||||||
session.load_routes (routes);
|
session.load_routes (routes, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ AudioFileSource::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioFileSource::set_state (const XMLNode& node)
|
AudioFileSource::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
if (Source::set_state (node)) {
|
if (Source::set_state (node)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -751,7 +751,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioRegion::set_state (const XMLNode& node)
|
AudioRegion::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
/* Region::set_state() calls the virtual set_live_state(),
|
/* Region::set_state() calls the virtual set_live_state(),
|
||||||
which will get us back to AudioRegion::set_live_state()
|
which will get us back to AudioRegion::set_live_state()
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ AudioSource::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioSource::set_state (const XMLNode& node)
|
AudioSource::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ AutomationList::deserialize_events (const XMLNode& node)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AutomationList::set_state (const XMLNode& node)
|
AutomationList::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
XMLNode* nsos;
|
XMLNode* nsos;
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@ ControlProtocolManager::cpi_by_name (string name)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ControlProtocolManager::set_state (const XMLNode& node)
|
ControlProtocolManager::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList clist;
|
XMLNodeList clist;
|
||||||
XMLNodeConstIterator citer;
|
XMLNodeConstIterator citer;
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,7 @@ Crossfade::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Crossfade::set_state (const XMLNode& node)
|
Crossfade::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeConstIterator i;
|
XMLNodeConstIterator i;
|
||||||
XMLNodeList children;
|
XMLNodeList children;
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ Delivery::state (bool full_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Delivery::set_state (const XMLNode& node)
|
Delivery::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ FileSource::init (const ustring& pathstr, bool must_exist)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
FileSource::set_state (const XMLNode& node)
|
FileSource::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ InternalReturn::get_state()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
InternalReturn::set_state (const XMLNode& node)
|
InternalReturn::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
return Return::set_state (node);
|
return Return::set_state (node);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ InternalSend::get_state()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
InternalSend::set_state (const XMLNode& node)
|
InternalSend::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -515,8 +515,14 @@ IO::state (bool /*full_state*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::set_state (const XMLNode& node)
|
IO::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
|
/* callers for version < 3000 need to call set_state_2X directly, as A3 IOs
|
||||||
|
* are input OR output, not both, so the direction needs to be specified
|
||||||
|
* by the caller.
|
||||||
|
*/
|
||||||
|
assert (version >= 3000);
|
||||||
|
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
XMLNodeConstIterator iter;
|
XMLNodeConstIterator iter;
|
||||||
LocaleGuard lg (X_("POSIX"));
|
LocaleGuard lg (X_("POSIX"));
|
||||||
|
|
@ -547,19 +553,21 @@ IO::set_state (const XMLNode& node)
|
||||||
_direction = (Direction) string_2_enum (prop->value(), _direction);
|
_direction = (Direction) string_2_enum (prop->value(), _direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create_ports (node)) {
|
if (create_ports (node, version)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connecting_legal) {
|
if (connecting_legal) {
|
||||||
|
|
||||||
if (make_connections (node)) {
|
if (make_connections (node, version, false)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
pending_state_node = new XMLNode (node);
|
pending_state_node = new XMLNode (node);
|
||||||
|
pending_state_node_version = version;
|
||||||
|
pending_state_node_in = false;
|
||||||
connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal));
|
connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -567,6 +575,58 @@ IO::set_state (const XMLNode& node)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
IO::set_state_2X (const XMLNode& node, int version, bool in)
|
||||||
|
{
|
||||||
|
const XMLProperty* prop;
|
||||||
|
XMLNodeConstIterator iter;
|
||||||
|
LocaleGuard lg (X_("POSIX"));
|
||||||
|
|
||||||
|
/* force use of non-localized representation of decimal point,
|
||||||
|
since we use it a lot in XML files and so forth.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (node.name() != state_node_name) {
|
||||||
|
error << string_compose(_("incorrect XML node \"%1\" passed to IO object"), node.name()) << endmsg;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = node.property ("name")) != 0) {
|
||||||
|
set_name (prop->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = node.property (X_("default-type"))) != 0) {
|
||||||
|
_default_type = DataType(prop->value());
|
||||||
|
assert(_default_type != DataType::NIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = node.property ("id")) != 0) {
|
||||||
|
_id = prop->value ();
|
||||||
|
}
|
||||||
|
|
||||||
|
_direction = in ? Input : Output;
|
||||||
|
|
||||||
|
if (create_ports (node, version)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (connecting_legal) {
|
||||||
|
|
||||||
|
if (make_connections_2X (node, version, in)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
pending_state_node = new XMLNode (node);
|
||||||
|
pending_state_node_version = version;
|
||||||
|
pending_state_node_in = in;
|
||||||
|
connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::connecting_became_legal ()
|
IO::connecting_became_legal ()
|
||||||
{
|
{
|
||||||
|
|
@ -576,7 +636,7 @@ IO::connecting_became_legal ()
|
||||||
|
|
||||||
connection_legal_c.disconnect ();
|
connection_legal_c.disconnect ();
|
||||||
|
|
||||||
ret = make_connections (*pending_state_node);
|
ret = make_connections (*pending_state_node, pending_state_node_version, pending_state_node_in);
|
||||||
|
|
||||||
delete pending_state_node;
|
delete pending_state_node;
|
||||||
pending_state_node = 0;
|
pending_state_node = 0;
|
||||||
|
|
@ -679,8 +739,36 @@ IO::find_possible_bundle (const string &desired_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::get_port_counts (const XMLNode& node, ChanCount& n, boost::shared_ptr<Bundle>& c)
|
IO::get_port_counts_2X (XMLNode const & node, int version, ChanCount& n, boost::shared_ptr<Bundle>& c)
|
||||||
{
|
{
|
||||||
|
XMLProperty const * prop;
|
||||||
|
XMLNodeList children = node.children ();
|
||||||
|
|
||||||
|
uint32_t n_audio = 0;
|
||||||
|
|
||||||
|
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
|
||||||
|
|
||||||
|
if ((prop = node.property ("inputs")) != 0 && _direction == Input) {
|
||||||
|
n_audio = count (prop->value().begin(), prop->value().end(), '{');
|
||||||
|
} else if ((prop = node.property ("outputs")) != 0 && _direction == Output) {
|
||||||
|
n_audio = count (prop->value().begin(), prop->value().end(), '{');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanCount cnt;
|
||||||
|
cnt.set_audio (n_audio);
|
||||||
|
n = ChanCount::max (n, cnt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
IO::get_port_counts (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr<Bundle>& c)
|
||||||
|
{
|
||||||
|
if (version < 3000) {
|
||||||
|
return get_port_counts_2X (node, version, n, c);
|
||||||
|
}
|
||||||
|
|
||||||
XMLProperty const * prop;
|
XMLProperty const * prop;
|
||||||
XMLNodeConstIterator iter;
|
XMLNodeConstIterator iter;
|
||||||
uint32_t n_audio = 0;
|
uint32_t n_audio = 0;
|
||||||
|
|
@ -728,13 +816,13 @@ IO::get_port_counts (const XMLNode& node, ChanCount& n, boost::shared_ptr<Bundle
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::create_ports (const XMLNode& node)
|
IO::create_ports (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
ChanCount n;
|
ChanCount n;
|
||||||
boost::shared_ptr<Bundle> c;
|
boost::shared_ptr<Bundle> c;
|
||||||
|
|
||||||
get_port_counts (node, n, c);
|
get_port_counts (node, version, n, c);
|
||||||
|
|
||||||
if (ensure_ports (n, true, true, this)) {
|
if (ensure_ports (n, true, true, this)) {
|
||||||
error << string_compose(_("%1: cannot create I/O ports"), _name) << endmsg;
|
error << string_compose(_("%1: cannot create I/O ports"), _name) << endmsg;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -746,8 +834,12 @@ IO::create_ports (const XMLNode& node)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::make_connections (const XMLNode& node)
|
IO::make_connections (const XMLNode& node, int version, bool in)
|
||||||
{
|
{
|
||||||
|
if (version < 3000) {
|
||||||
|
return make_connections_2X (node, version, in);
|
||||||
|
}
|
||||||
|
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
for (XMLNodeConstIterator i = node.children().begin(); i != node.children().end(); ++i) {
|
for (XMLNodeConstIterator i = node.children().begin(); i != node.children().end(); ++i) {
|
||||||
|
|
@ -798,6 +890,101 @@ IO::make_connections (const XMLNode& node)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
IO::make_connections_2X (const XMLNode& node, int version, bool in)
|
||||||
|
{
|
||||||
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
/* XXX: bundles ("connections" as was) */
|
||||||
|
|
||||||
|
if ((prop = node.property ("inputs")) != 0 && in) {
|
||||||
|
|
||||||
|
string::size_type ostart = 0;
|
||||||
|
string::size_type start = 0;
|
||||||
|
string::size_type end = 0;
|
||||||
|
int i = 0;
|
||||||
|
int n;
|
||||||
|
vector<string> ports;
|
||||||
|
|
||||||
|
string const str = prop->value ();
|
||||||
|
|
||||||
|
while ((start = str.find_first_of ('{', ostart)) != string::npos) {
|
||||||
|
start += 1;
|
||||||
|
|
||||||
|
if ((end = str.find_first_of ('}', start)) == string::npos) {
|
||||||
|
error << string_compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) {
|
||||||
|
error << string_compose(_("bad input string in XML node \"%1\""), str) << endmsg;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
} else if (n > 0) {
|
||||||
|
|
||||||
|
|
||||||
|
for (int x = 0; x < n; ++x) {
|
||||||
|
/* XXX: this is a bit of a hack; need to check if it's always valid */
|
||||||
|
string::size_type const p = ports[x].find ("/out");
|
||||||
|
if (p != string::npos) {
|
||||||
|
ports[x].replace (p, 4, "/audio_out");
|
||||||
|
}
|
||||||
|
nth(i)->connect (ports[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ostart = end+1;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = node.property ("outputs")) != 0 && !in) {
|
||||||
|
|
||||||
|
string::size_type ostart = 0;
|
||||||
|
string::size_type start = 0;
|
||||||
|
string::size_type end = 0;
|
||||||
|
int i = 0;
|
||||||
|
int n;
|
||||||
|
vector<string> ports;
|
||||||
|
|
||||||
|
string const str = prop->value ();
|
||||||
|
|
||||||
|
while ((start = str.find_first_of ('{', ostart)) != string::npos) {
|
||||||
|
start += 1;
|
||||||
|
|
||||||
|
if ((end = str.find_first_of ('}', start)) == string::npos) {
|
||||||
|
error << string_compose(_("IO: badly formed string in XML node for outputs \"%1\""), str) << endmsg;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) {
|
||||||
|
error << string_compose(_("IO: bad output string in XML node \"%1\""), str) << endmsg;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
} else if (n > 0) {
|
||||||
|
|
||||||
|
for (int x = 0; x < n; ++x) {
|
||||||
|
/* XXX: this is a bit of a hack; need to check if it's always valid */
|
||||||
|
string::size_type const p = ports[x].find ("/in");
|
||||||
|
if (p != string::npos) {
|
||||||
|
ports[x].replace (p, 3, "/audio_in");
|
||||||
|
}
|
||||||
|
nth(i)->connect (ports[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ostart = end+1;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IO::set_ports (const string& str)
|
IO::set_ports (const string& str)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ IOProcessor::state (bool full_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
IOProcessor::set_state (const XMLNode& node)
|
IOProcessor::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
const XMLNode *io_node = 0;
|
const XMLNode *io_node = 0;
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,59 @@ LadspaPlugin::save_preset (string name)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
LadspaPlugin::set_state(const XMLNode& node)
|
LadspaPlugin::set_state (const XMLNode& node, int version)
|
||||||
|
{
|
||||||
|
if (version < 3000) {
|
||||||
|
return set_state_2X (node, version);
|
||||||
|
}
|
||||||
|
|
||||||
|
XMLNodeList nodes;
|
||||||
|
XMLProperty *prop;
|
||||||
|
XMLNodeConstIterator iter;
|
||||||
|
XMLNode *child;
|
||||||
|
const char *port;
|
||||||
|
const char *data;
|
||||||
|
uint32_t port_id;
|
||||||
|
LocaleGuard lg (X_("POSIX"));
|
||||||
|
|
||||||
|
cout << "LADSPA Plugin set state " << version << "\n";
|
||||||
|
cout << "- node " << node.name() << "\n";
|
||||||
|
|
||||||
|
if (node.name() != state_node_name()) {
|
||||||
|
error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
nodes = node.children ("Port");
|
||||||
|
|
||||||
|
for(iter = nodes.begin(); iter != nodes.end(); ++iter){
|
||||||
|
|
||||||
|
child = *iter;
|
||||||
|
|
||||||
|
if ((prop = child->property("number")) != 0) {
|
||||||
|
port = prop->value().c_str();
|
||||||
|
} else {
|
||||||
|
warning << _("LADSPA: no ladspa port number") << endmsg;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((prop = child->property("value")) != 0) {
|
||||||
|
data = prop->value().c_str();
|
||||||
|
} else {
|
||||||
|
warning << _("LADSPA: no ladspa port data") << endmsg;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
sscanf (port, "%" PRIu32, &port_id);
|
||||||
|
set_parameter (port_id, atof(data));
|
||||||
|
}
|
||||||
|
|
||||||
|
latency_compute_run ();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
LadspaPlugin::set_state_2X (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nodes;
|
XMLNodeList nodes;
|
||||||
XMLProperty *prop;
|
XMLProperty *prop;
|
||||||
|
|
@ -389,12 +441,15 @@ LadspaPlugin::set_state(const XMLNode& node)
|
||||||
uint32_t port_id;
|
uint32_t port_id;
|
||||||
LocaleGuard lg (X_("POSIX"));
|
LocaleGuard lg (X_("POSIX"));
|
||||||
|
|
||||||
|
cout << "LADSPA Plugin set state " << version << "\n";
|
||||||
|
cout << "- node " << node.name() << "\n";
|
||||||
|
|
||||||
if (node.name() != state_node_name()) {
|
if (node.name() != state_node_name()) {
|
||||||
error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
|
error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes = node.children ("Port");
|
nodes = node.children ("port");
|
||||||
|
|
||||||
for(iter = nodes.begin(); iter != nodes.end(); ++iter){
|
for(iter = nodes.begin(); iter != nodes.end(); ++iter){
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ Location::Location (const Location& other)
|
||||||
_locked = false;
|
_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Location::Location (const XMLNode& node)
|
Location::Location (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
if (set_state (node)) {
|
if (set_state (node)) {
|
||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
|
|
@ -347,7 +347,7 @@ Location::get_state (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Location::set_state (const XMLNode& node)
|
Location::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
|
|
||||||
|
|
@ -674,7 +674,7 @@ Locations::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Locations::set_state (const XMLNode& node)
|
Locations::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
XMLNodeConstIterator niter;
|
XMLNodeConstIterator niter;
|
||||||
|
|
|
||||||
|
|
@ -1381,7 +1381,7 @@ MidiDiskstream::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiDiskstream::set_state (const XMLNode& node)
|
MidiDiskstream::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ MidiModel::DeltaCommand::unmarshal_note(XMLNode *xml_note)
|
||||||
#define DELTA_COMMAND_ELEMENT "DeltaCommand"
|
#define DELTA_COMMAND_ELEMENT "DeltaCommand"
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiModel::DeltaCommand::set_state(const XMLNode& delta_command)
|
MidiModel::DeltaCommand::set_state (const XMLNode& delta_command, int version)
|
||||||
{
|
{
|
||||||
if (delta_command.name() != string(DELTA_COMMAND_ELEMENT)) {
|
if (delta_command.name() != string(DELTA_COMMAND_ELEMENT)) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -646,7 +646,7 @@ MidiModel::DiffCommand::unmarshal_change(XMLNode *xml_change)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiModel::DiffCommand::set_state(const XMLNode& diff_command)
|
MidiModel::DiffCommand::set_state(const XMLNode& diff_command, int version)
|
||||||
{
|
{
|
||||||
if (diff_command.name() != string(DIFF_COMMAND_ELEMENT)) {
|
if (diff_command.name() != string(DIFF_COMMAND_ELEMENT)) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ MidiPlaylist::check_dependents (boost::shared_ptr<Region> /*r*/, bool /*norefres
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiPlaylist::set_state (const XMLNode& node)
|
MidiPlaylist::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
in_set_state++;
|
in_set_state++;
|
||||||
freeze ();
|
freeze ();
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ MidiRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiRegion::set_state (const XMLNode& node)
|
MidiRegion::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
/* Region::set_state() calls the virtual set_live_state(),
|
/* Region::set_state() calls the virtual set_live_state(),
|
||||||
which will get us back to AudioRegion::set_live_state()
|
which will get us back to AudioRegion::set_live_state()
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ MidiSource::get_state ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiSource::set_state (const XMLNode& node)
|
MidiSource::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,8 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo
|
||||||
_mode = mode;
|
_mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
MidiTrack::MidiTrack (Session& sess, const XMLNode& node)
|
MidiTrack::MidiTrack (Session& sess, const XMLNode& node, int version)
|
||||||
: Track (sess, node, DataType::MIDI )
|
: Track (sess, node, version, DataType::MIDI)
|
||||||
, _immediate_events(1024) // FIXME: size?
|
, _immediate_events(1024) // FIXME: size?
|
||||||
, _step_edit_ring_buffer(64) // FIXME: size?
|
, _step_edit_ring_buffer(64) // FIXME: size?
|
||||||
, _note_mode(Sustained)
|
, _note_mode(Sustained)
|
||||||
|
|
@ -75,7 +75,7 @@ MidiTrack::MidiTrack (Session& sess, const XMLNode& node)
|
||||||
, _default_channel (0)
|
, _default_channel (0)
|
||||||
, _midi_thru (true)
|
, _midi_thru (true)
|
||||||
{
|
{
|
||||||
_set_state(node, false);
|
_set_state (node, version, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
MidiTrack::~MidiTrack ()
|
MidiTrack::~MidiTrack ()
|
||||||
|
|
@ -155,18 +155,18 @@ MidiTrack::midi_diskstream() const
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiTrack::set_state (const XMLNode& node)
|
MidiTrack::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
return _set_state (node, true);
|
return _set_state (node, version, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiTrack::_set_state (const XMLNode& node, bool call_base)
|
MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
XMLNodeConstIterator iter;
|
XMLNodeConstIterator iter;
|
||||||
|
|
||||||
if (Route::_set_state (node, call_base)) {
|
if (Route::_set_state (node, version, call_base)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ MuteMaster::get_value () const
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MuteMaster::set_state (const XMLNode& node)
|
MuteMaster::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ NamedSelection::~NamedSelection ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NamedSelection::set_state (const XMLNode& /*node*/)
|
NamedSelection::set_state (const XMLNode& /*node*/, int /*version*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ StreamPanner::set_position (float xpos, float ypos, float zpos, bool link_call)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
StreamPanner::set_state (const XMLNode& node)
|
StreamPanner::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
XMLNodeConstIterator iter;
|
XMLNodeConstIterator iter;
|
||||||
|
|
@ -485,7 +485,7 @@ EqualPowerStereoPanner::state (bool /*full_state*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EqualPowerStereoPanner::set_state (const XMLNode& node)
|
EqualPowerStereoPanner::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
float pos;
|
float pos;
|
||||||
|
|
@ -673,7 +673,7 @@ Multi2dPanner::state (bool /*full_state*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Multi2dPanner::set_state (const XMLNode& node)
|
Multi2dPanner::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
float newx,newy;
|
float newx,newy;
|
||||||
|
|
@ -830,6 +830,8 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
bool do_not_and_did_not_need_panning = ((nouts < 2) && (outputs.size() < 2));
|
bool do_not_and_did_not_need_panning = ((nouts < 2) && (outputs.size() < 2));
|
||||||
|
|
||||||
|
cout << "Reset panner for " << nouts << " " << npans << "\n";
|
||||||
|
|
||||||
/* if new and old config don't need panning, or if
|
/* if new and old config don't need panning, or if
|
||||||
the config hasn't changed, we're done.
|
the config hasn't changed, we're done.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1085,7 +1087,7 @@ Panner::state (bool full)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Panner::set_state (const XMLNode& node)
|
Panner::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
XMLNodeConstIterator niter;
|
XMLNodeConstIterator niter;
|
||||||
|
|
|
||||||
|
|
@ -1789,7 +1789,7 @@ Playlist::mark_session_dirty ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Playlist::set_state (const XMLNode& node)
|
Playlist::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNode *child;
|
XMLNode *child;
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
|
|
|
||||||
|
|
@ -81,12 +81,12 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug)
|
||||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInsert::PluginInsert (Session& s, const XMLNode& node)
|
PluginInsert::PluginInsert (Session& s, const XMLNode& node, int version)
|
||||||
: Processor (s, "unnamed plugin insert"),
|
: Processor (s, "unnamed plugin insert"),
|
||||||
_signal_analysis_collected_nframes(0),
|
_signal_analysis_collected_nframes(0),
|
||||||
_signal_analysis_collect_nframes_max(0)
|
_signal_analysis_collect_nframes_max(0)
|
||||||
{
|
{
|
||||||
if (set_state (node)) {
|
if (set_state (node, version)) {
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -716,7 +716,7 @@ PluginInsert::state (bool full)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PluginInsert::set_state(const XMLNode& node)
|
PluginInsert::set_state(const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
XMLNodeIterator niter;
|
XMLNodeIterator niter;
|
||||||
|
|
@ -730,6 +730,7 @@ PluginInsert::set_state(const XMLNode& node)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prop->value() == X_("ladspa") || prop->value() == X_("Ladspa")) { /* handle old school sessions */
|
if (prop->value() == X_("ladspa") || prop->value() == X_("Ladspa")) { /* handle old school sessions */
|
||||||
|
cout << "- LADSPA\n";
|
||||||
type = ARDOUR::LADSPA;
|
type = ARDOUR::LADSPA;
|
||||||
} else if (prop->value() == X_("lv2")) {
|
} else if (prop->value() == X_("lv2")) {
|
||||||
type = ARDOUR::LV2;
|
type = ARDOUR::LV2;
|
||||||
|
|
@ -743,6 +744,7 @@ PluginInsert::set_state(const XMLNode& node)
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = node.property ("unique-id");
|
prop = node.property ("unique-id");
|
||||||
|
cout << "- ID " << prop->value() << "\n";
|
||||||
if (prop == 0) {
|
if (prop == 0) {
|
||||||
error << _("Plugin has no unique ID field") << endmsg;
|
error << _("Plugin has no unique ID field") << endmsg;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -777,7 +779,7 @@ PluginInsert::set_state(const XMLNode& node)
|
||||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||||
if ((*niter)->name() == plugin->state_node_name()) {
|
if ((*niter)->name() == plugin->state_node_name()) {
|
||||||
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
|
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
|
||||||
(*i)->set_state (**niter);
|
(*i)->set_state (**niter, version);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -792,8 +794,8 @@ PluginInsert::set_state(const XMLNode& node)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Processor::set_state (*insert_node);
|
Processor::set_state (*insert_node, version);
|
||||||
|
|
||||||
/* look for port automation node */
|
/* look for port automation node */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm)
|
||||||
ProcessorCreated (this); /* EMIT SIGNAL */
|
ProcessorCreated (this); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
|
PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node, int version)
|
||||||
: IOProcessor (s, true, true, "unnamed port insert")
|
: IOProcessor (s, true, true, "unnamed port insert")
|
||||||
, _out (new Delivery (s, _output, mm, _name, Delivery::Insert))
|
, _out (new Delivery (s, _output, mm, _name, Delivery::Insert))
|
||||||
|
|
||||||
{
|
{
|
||||||
if (set_state (node)) {
|
if (set_state (node, version)) {
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ PortInsert::state (bool full)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PortInsert::set_state(const XMLNode& node)
|
PortInsert::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
XMLNodeIterator niter;
|
XMLNodeIterator niter;
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,43 @@ Processor::state (bool full_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Processor::set_state (const XMLNode& node)
|
Processor::set_state_2X (const XMLNode & node, int version)
|
||||||
{
|
{
|
||||||
|
XMLProperty const * prop;
|
||||||
|
|
||||||
|
XMLNodeList children = node.children ();
|
||||||
|
|
||||||
|
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
|
||||||
|
|
||||||
|
if ((*i)->name() == X_("IO")) {
|
||||||
|
|
||||||
|
if ((prop = (*i)->property ("name")) != 0) {
|
||||||
|
set_name (prop->value ());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = (*i)->property ("id")) != 0) {
|
||||||
|
_id = prop->value ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = (*i)->property ("active")) != 0) {
|
||||||
|
if (_active != string_is_affirmative (prop->value())) {
|
||||||
|
_active = !_active;
|
||||||
|
ActiveChanged (); /* EMIT_SIGNAL */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
Processor::set_state (const XMLNode& node, int version)
|
||||||
|
{
|
||||||
|
if (version < 3000) {
|
||||||
|
return set_state_2X (node, version);
|
||||||
|
}
|
||||||
|
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
const XMLProperty *legacy_active = 0;
|
const XMLProperty *legacy_active = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ RCConfiguration::get_variables ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
RCConfiguration::set_state (const XMLNode& root)
|
RCConfiguration::set_state (const XMLNode& root, int version)
|
||||||
{
|
{
|
||||||
if (root.name() != "Ardour") {
|
if (root.name() != "Ardour") {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -1339,7 +1339,7 @@ Region::set_live_state (const XMLNode& node, Change& what_changed, bool send)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Region::set_state (const XMLNode& node)
|
Region::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
const XMLProperty *prop;
|
const XMLProperty *prop;
|
||||||
Change what_changed = Change (0);
|
Change what_changed = Change (0);
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ Return::state(bool full)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Return::set_state(const XMLNode& node)
|
Return::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
XMLNodeList nlist = node.children();
|
XMLNodeList nlist = node.children();
|
||||||
XMLNodeIterator niter;
|
XMLNodeIterator niter;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue