Skip silent sources on session-archive -- fixes #7699
authorRobin Gareus <robin@gareus.org>
Wed, 5 Dec 2018 15:05:56 +0000 (16:05 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 5 Dec 2018 15:54:13 +0000 (16:54 +0100)
libs/ardour/session_state.cc

index e98a698175fcf5c342f59856b3768156366ee918..874fa30f11a932e09cabd7b65f432ca332b13cfa 100644 (file)
@@ -5259,6 +5259,9 @@ Session::archive_session (const std::string& dest,
                /* build a list of used names */
                std::set<std::string> audio_file_names;
                for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
+                       if (boost::dynamic_pointer_cast<SilentFileSource> (i->second)) {
+                               continue;
+                       }
                        boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (i->second);
                        if (!afs || afs->readable_length () == 0) {
                                continue;
@@ -5275,6 +5278,9 @@ Session::archive_session (const std::string& dest,
                }
 
                for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
+                       if (boost::dynamic_pointer_cast<SilentFileSource> (i->second)) {
+                               continue;
+                       }
                        boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (i->second);
                        if (!afs || afs->readable_length () == 0) {
                                continue;
@@ -5336,6 +5342,9 @@ Session::archive_session (const std::string& dest,
 
                Glib::Threads::Mutex::Lock lm (source_lock);
                for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
+                       if (boost::dynamic_pointer_cast<SilentFileSource> (i->second)) {
+                               continue;
+                       }
                        boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (i->second);
                        if (!afs || afs->readable_length () == 0) {
                                continue;