summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-07 19:00:44 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-07 19:00:44 -0500
commit2a7ed69c28c5c4606ff13b3605b9bc9c3eba607d (patch)
tree8bc1cbb9df7bab6bafac672d11ce6e63f3a8542d /libs
parent89d5be353addf41e0d6cdf5c70cdc988a0c3d19a (diff)
parentd47fe167e3c1dc44e4114227b0e8b83b40b35169 (diff)
merge with master, with minor conflict fixes
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/file_source.h1
-rw-r--r--libs/ardour/delivery.cc2
-rw-r--r--libs/ardour/file_source.cc20
-rw-r--r--libs/ardour/internal_send.cc2
-rw-r--r--libs/ardour/session_state.cc28
5 files changed, 38 insertions, 15 deletions
diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h
index 4b1dbf2b6c..34e84c2428 100644
--- a/libs/ardour/ardour/file_source.h
+++ b/libs/ardour/ardour/file_source.h
@@ -74,6 +74,7 @@ public:
void inc_use_count ();
bool removable () const;
+ bool is_stub () const;
const std::string& origin() const { return _origin; }
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 4a392a8145..8c12d44e51 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -397,7 +397,7 @@ Delivery::reset_panner ()
if (panners_legal) {
if (!_no_panner_reset) {
- if (_panshell && _role != Insert) {
+ if (_panshell && _role != Insert && _role != Listen) {
_panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, pan_outs()));
}
}
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc
index e06b3d624e..39b6688113 100644
--- a/libs/ardour/file_source.cc
+++ b/libs/ardour/file_source.cc
@@ -101,7 +101,7 @@ FileSource::removable () const
{
bool r = ((_flags & Removable)
&& ((_flags & RemoveAtDestroy) ||
- ((_flags & RemovableIfEmpty) && empty() == 0)));
+ ((_flags & RemovableIfEmpty) && empty())));
return r;
}
@@ -581,3 +581,21 @@ FileSource::inc_use_count ()
Source::inc_use_count ();
}
+bool
+FileSource::is_stub () const
+{
+ if (!empty()) {
+ return false;
+ }
+
+ if (!removable()) {
+ return false;
+ }
+
+ if (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)) {
+ return false;
+ }
+
+ return true;
+}
+
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 1d4e18d06e..17a3ca1f42 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -129,7 +129,7 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
// we have to copy the input, because we may alter the buffers with the amp
// in-place, which a send must never do.
- if (_panshell && !_panshell->bypassed()) {
+ if (_panshell && !_panshell->bypassed() && role() != Listen) {
_panshell->run (bufs, mixbufs, start_frame, end_frame, nframes);
} else {
if (role() == Listen) {
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 5c3ffae3cc..3e117f61d3 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -137,7 +137,7 @@ Session::pre_engine_init (string fullpath)
/* discover canonical fullpath */
_path = canonical_path(fullpath);
-
+
/* we require _path to end with a dir separator */
if (_path[_path.length()-1] != G_DIR_SEPARATOR) {
@@ -2736,19 +2736,23 @@ Session::cleanup_sources (CleanupReport& rep)
++tmp;
if ((fs = boost::dynamic_pointer_cast<FileSource> (i->second)) != 0) {
- if (playlists->source_use_count (fs) != 0) {
- all_sources.insert (fs->path());
- } else {
- /* we might not remove this source from disk, because it may be used
- by other snapshots, but its not being used in this version
- so lets get rid of it now, along with any representative regions
- in the region list.
- */
+ if (!fs->is_stub()) {
- RegionFactory::remove_regions_using_source (i->second);
- sources.erase (i);
- }
+ if (playlists->source_use_count (fs) != 0) {
+ all_sources.insert (fs->path());
+ } else {
+
+ /* we might not remove this source from disk, because it may be used
+ by other snapshots, but its not being used in this version
+ so lets get rid of it now, along with any representative regions
+ in the region list.
+ */
+
+ RegionFactory::remove_regions_using_source (i->second);
+ sources.erase (i);
+ }
+ }
}
i = tmp;