add left/right side trim cursors and use them for region trimming, as appropriate
[ardour.git] / libs / ardour / source.cc
index 394d4b39af3d8d977e5ec74f42fc786166de1d0d..5ec9631e40ba9684c34f633d29c50ee64db4f3b7 100644 (file)
@@ -36,6 +36,7 @@
 #include "pbd/pthread_utils.h"
 #include "pbd/enumwriter.h"
 
+#include "ardour/debug.h"
 #include "ardour/session.h"
 #include "ardour/source.h"
 #include "ardour/transient_detector.h"
@@ -44,6 +45,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 
 Source::Source (Session& s, DataType type, const string& name, Flag flags)
        : SessionObject(s, name)
@@ -74,10 +76,9 @@ Source::Source (Session& s, const XMLNode& node)
 
 Source::~Source ()
 {
-       notify_callbacks ();
+       DEBUG_TRACE (DEBUG::Destruction, string_compose ("Source %1 destructor %2\n", _name, this));
 }
 
-
 void
 Source::fix_writable_flags ()
 {
@@ -237,10 +238,12 @@ Source::check_for_analysis_data_on_disk ()
 void
 Source::mark_for_remove ()
 {
-       // This operation is not allowed for sources for destructive tracks or embedded files.
-       // Fortunately mark_for_remove() is never called for embedded files. This function
-       // must be fixed if that ever happens.
-       if (_flags & Destructive) {
+       // This operation is not allowed for sources for destructive tracks or out-of-session files.
+
+       /* XXX need a way to detect _within_session() condition here - move it from FileSource? 
+        */
+
+       if ((_flags & Destructive)) { 
                return;
        }