summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index a490bb10c9..0f8583a822 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1040,13 +1040,18 @@ Session::state(bool full_state)
for (SourceMap::iterator siter = sources.begin(); siter != sources.end(); ++siter) {
- /* Don't save information about non-destructive file sources that are empty */
- /* FIXME: MIDI breaks if this is made FileSource like it should be... */
+ /* Don't save information about non-destructive file sources that are empty
+ and unused by any regions.
+ */
- boost::shared_ptr<AudioFileSource> fs;
- if ((fs = boost::dynamic_pointer_cast<AudioFileSource> (siter->second)) != 0) {
+ cerr << "Source " << siter->second->name() << " has UC = " << siter->second->used()
+ << " length = " << siter->second->length (0)
+ << endl;
+
+ boost::shared_ptr<FileSource> fs;
+ if ((fs = boost::dynamic_pointer_cast<FileSource> (siter->second)) != 0) {
if (!fs->destructive()) {
- if (fs->length(fs->timeline_position()) == 0) {
+ if (fs->length(fs->timeline_position()) == 0 && !fs->used()) {
continue;
}
}