summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct2
-rw-r--r--gtk2_ardour/ardour_ui.cc4
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc2
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/session.cc10
-rw-r--r--libs/ardour/session_command.cc1
-rw-r--r--libs/ardour/session_midi.cc1
-rw-r--r--libs/ardour/session_state.cc15
-rw-r--r--libs/ardour/session_transport.cc3
-rw-r--r--libs/ardour/track.cc2
-rw-r--r--libs/surfaces/control_protocol/basic_ui.cc2
11 files changed, 26 insertions, 18 deletions
diff --git a/SConstruct b/SConstruct
index fcc5382e92..d1945a0045 100644
--- a/SConstruct
+++ b/SConstruct
@@ -455,7 +455,7 @@ conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX')
libraries['flac'] = conf.Finish ()
# or if that fails...
-#libraries['flac'] = LibraryInfo (LIBS='FLAC')
+libraries['flac'] = LibraryInfo (LIBS='FLAC')
#
# Check for liblo
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index d18756fb7f..12c2d63b80 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1298,7 +1298,7 @@ ARDOUR_UI::start_engine ()
settings for a new session
*/
session->save_state ("");
- session->save_history ();
+ session->save_history ("");
}
/* there is too much going on, in too many threads, for us to
@@ -1472,7 +1472,7 @@ ARDOUR_UI::save_state_canfail (string name)
}
if ((ret = session->save_state (name)) != 0) {
- session->save_history();
+ session->save_history (name);
return ret;
}
}
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index d2cc3e1e1c..5a1ec87462 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -156,7 +156,7 @@ ARDOUR_UI::unload_session ()
case 1:
session->save_state ("");
- session->save_history();
+ session->save_history ("");
break;
}
}
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 632e85eade..ebb13011fc 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -477,7 +477,7 @@ class Session : public sigc::trackable, public Stateful
int save_state (string snapshot_name, bool pending = false);
int restore_state (string snapshot_name);
int save_template (string template_name);
- int save_history ();
+ int save_history (string snapshot_name = "");
static int rename_template (string old_name, string new_name);
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 8a68e5a3b5..d2b7c7afc1 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1011,7 +1011,7 @@ Session::auto_punch_start_changed (Location* location)
if (get_record_enabled() && get_punch_in()) {
/* capture start has been changed, so save new pending state */
save_state ("", true);
- save_history();
+ save_history("");
}
}
@@ -1329,7 +1329,7 @@ Session::maybe_enable_record ()
*/
save_state ("", true);
- save_history();
+ save_history ("");
if (_transport_speed) {
if (!punch_in) {
@@ -1893,6 +1893,7 @@ Session::add_route (shared_ptr<Route> route)
set_dirty();
save_state (_current_snapshot_name);
+ save_history (_current_snapshot_name);
RouteAdded (route); /* EMIT SIGNAL */
}
@@ -1924,7 +1925,7 @@ Session::add_diskstream (Diskstream* dstream)
set_dirty();
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
DiskstreamAdded (dstream); /* EMIT SIGNAL */
}
@@ -1989,6 +1990,7 @@ Session::remove_route (shared_ptr<Route> route)
/* XXX should we disconnect from the Route's signals ? */
save_state (_current_snapshot_name);
+ save_history (_current_snapshot_name);
/* all shared ptrs to route should go out of scope here */
}
@@ -2677,7 +2679,7 @@ Session::remove_source (Source* source)
*/
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
}
SourceRemoved(source); /* EMIT SIGNAL */
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc
index 276b2c1822..556c6ea9a3 100644
--- a/libs/ardour/session_command.cc
+++ b/libs/ardour/session_command.cc
@@ -9,7 +9,6 @@ Command *Session::memento_command_factory(XMLNode *n)
{
PBD::ID id;
XMLNode *before, *after;
- void *obj;
/* get obj_id */
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index 821f894eeb..887d6f5c19 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -594,6 +594,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &mmc)
*/
save_state ("", true);
+ save_history ("");
g_atomic_int_set (&_record_status, Enabled);
RecordStateChanged (); /* EMIT SIGNAL */
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 2813cc72f0..a4e5144447 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -608,7 +608,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
_state_of_the_state = Clean;
if (save_state (_current_snapshot_name)) {
- save_history();
+ save_history (_current_snapshot_name);
return -1;
}
}
@@ -1691,7 +1691,7 @@ Session::set_state (const XMLNode& node)
if (state_was_pending) {
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
remove_pending_capture_state ();
state_was_pending = false;
}
@@ -2479,7 +2479,7 @@ void
Session::auto_save()
{
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
}
RouteGroup *
@@ -3151,6 +3151,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
*/
save_state ("");
+ save_history ("");
out:
_state_of_the_state = (StateOfTheState) (_state_of_the_state & ~InCleanup);
@@ -3284,7 +3285,7 @@ Session::add_instant_xml (XMLNode& node, const std::string& dir)
int
-Session::save_history ()
+Session::save_history (string snapshot_name)
{
XMLTree tree;
string xml_path;
@@ -3292,7 +3293,11 @@ Session::save_history ()
tree.set_root (&history.get_state());
- xml_path = _path + _current_snapshot_name + ".history";
+ if (snapshot_name.empty()) {
+ snapshot_name = _current_snapshot_name;
+ }
+
+ xml_path = _path + snapshot_name + ".history";
bak_path = xml_path + ".bak";
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index df9d4aa2e9..1f70a9ebb8 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -411,7 +411,7 @@ Session::non_realtime_stop (bool abort)
if ((post_transport_work & PostTransportLocate) && get_record_enabled()) {
/* capture start has been changed, so save pending state */
save_state ("", true);
- save_history();
+ save_history ("");
}
/* always try to get rid of this */
@@ -422,6 +422,7 @@ Session::non_realtime_stop (bool abort)
if (did_record) {
save_state (_current_snapshot_name);
+ save_history (_current_snapshot_name);
}
if (post_transport_work & PostTransportDuration) {
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 941524b54c..dbd1a15401 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -224,7 +224,7 @@ Track::set_name (string str, void *src)
if ((ret = IO::set_name (str, src)) == 0) {
_session.save_state ("");
- _session.save_history();
+ _session.save_history ("");
}
return ret;
}
diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc
index 47401c8cfe..bee4783914 100644
--- a/libs/surfaces/control_protocol/basic_ui.cc
+++ b/libs/surfaces/control_protocol/basic_ui.cc
@@ -145,7 +145,7 @@ void
BasicUI::save_state ()
{
session->save_state ("");
- session->save_history();
+ session->save_history("");
}
void