diff options
author | David Robillard <d@drobilla.net> | 2007-04-29 17:23:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-04-29 17:23:11 +0000 |
commit | b3fe7cfc892f7d5978ad14eb81e9305fa9c14d13 (patch) | |
tree | 4c6617c0397fb1ad3bef1f5fced35fb64b022ccb /libs/ardour | |
parent | 490e18d80a22dda07bdf88dd440f7100897822de (diff) |
Merged with trunk R1761
git-svn-id: svn://localhost/ardour2/branches/midi@1762 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audio_playlist.cc | 4 | ||||
-rw-r--r-- | libs/ardour/audioengine.cc | 1 | ||||
-rw-r--r-- | libs/ardour/control_protocol_manager.cc | 1 | ||||
-rw-r--r-- | libs/ardour/insert.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_command.cc | 4 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 16 |
6 files changed, 18 insertions, 10 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 9dd7064f69..bd30ae0eeb 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -30,6 +30,7 @@ #include <ardour/crossfade.h> #include <ardour/crossfade_compare.h> #include <ardour/session.h> +#include <pbd/enumwriter.h> #include "i18n.h" @@ -386,6 +387,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh) } + OverlapType c = top->coverage (bottom->position(), bottom->last_frame()); try { @@ -416,7 +418,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh) xfade = boost::shared_ptr<Crossfade> (new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn)); add_crossfade (xfade); - + if (top_region_at (top->last_frame() - 1) == top) { /* only add a fade out if there is no region on top of the end of 'top' (which diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index c92fb25207..0bfa18be72 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -764,6 +764,7 @@ AudioEngine::halted (void *arg) ae->_running = false; ae->_buffer_size = 0; ae->_frame_rate = 0; + ae->_jack = 0; ae->Halted(); /* EMIT SIGNAL */ } diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index f7ae7f2b63..c79aa74698 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -97,6 +97,7 @@ ControlProtocolManager::drop_session () for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) { // otherwise the ControlProtocol instances are not recreated in set_session (*p)->requested = true; + (*p)->protocol = 0; } } } diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc index 956f693f13..66cf6b1d4c 100644 --- a/libs/ardour/insert.cc +++ b/libs/ardour/insert.cc @@ -424,7 +424,7 @@ PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offs while (nframes) { - nframes_t cnt = min (((nframes_t) floor (next_event.when) - now), nframes); + nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes); connect_and_run (bufs, cnt, offset, true, now); diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index aab60b294e..10f319ace8 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -81,8 +81,9 @@ Session::memento_command_factory(XMLNode *n) /* create command */ string obj_T = n->property ("type_name")->value(); if (obj_T == typeid (AudioRegion).name() || obj_T == typeid (MidiRegion).name() || obj_T == typeid (Region).name()) { - if (regions.count(id)) + if (regions.count(id)) { return new MementoCommand<Region>(*regions[id], before, after); + } } else if (obj_T == typeid (AudioSource).name() || obj_T == typeid (MidiSource).name()) { if (sources.count(id)) return new MementoCommand<Source>(*sources[id], before, after); @@ -107,6 +108,7 @@ Session::memento_command_factory(XMLNode *n) /* we failed */ error << string_compose (_("could not reconstitute MementoCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s()) << endmsg; + return 0 ; } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index e60774e2b1..d670173bd5 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -708,7 +708,7 @@ Session::save_state (string snapshot_name, bool pending) tmp_path += snapshot_name; tmp_path += ".tmp"; - cerr << "actually writing state to " << xml_path << endl; + // cerr << "actually writing state to " << xml_path << endl; if (!tree.write (tmp_path)) { error << string_compose (_("state could not be saved to %1"), tmp_path) << endmsg; @@ -770,7 +770,7 @@ Session::load_state (string snapshot_name) xmlpath += snapshot_name; xmlpath += _pending_suffix; - if (!access (xmlpath.c_str(), F_OK)) { + if (Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) { /* there is pending state from a crashed capture attempt */ @@ -785,8 +785,8 @@ Session::load_state (string snapshot_name) xmlpath += snapshot_name; xmlpath += _statefile_suffix; } - - if (access (xmlpath.c_str(), F_OK)) { + + if (!Glib::file_test (xmlpath, Glib::FILE_TEST_EXISTS)) { error << string_compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath) << endmsg; return 1; } @@ -828,8 +828,10 @@ Session::load_state (string snapshot_name) if (is_old) { string backup_path; - backup_path = xmlpath; - backup_path += ".1"; + backup_path = _path; + backup_path += snapshot_name; + backup_path += "-1"; + backup_path += _statefile_suffix; info << string_compose (_("Copying old session file %1 to %2\nUse %2 with Ardour versions before 2.0 from now on"), xmlpath, backup_path) @@ -1614,7 +1616,7 @@ Session::path_from_region_name (string name, string identifier) snprintf (buf, sizeof(buf), "%s/%s-%" PRIu32 ".wav", dir.c_str(), name.c_str(), n); } - if (!g_file_test (buf, G_FILE_TEST_EXISTS)) { + if (!Glib::file_test (buf, Glib::FILE_TEST_EXISTS)) { return buf; } } |