summaryrefslogtreecommitdiff
path: root/libs/ardour/element_importer.cc
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2008-11-26 17:13:50 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2008-11-26 17:13:50 +0000
commit38382b792113cbf23881c1dca64e16c2d0207d45 (patch)
tree5fb1185a6f21ecc769a4c229fc0f6b7415eabaf5 /libs/ardour/element_importer.cc
parent95a86871c028ab7f0ae16608adb9b86495678d50 (diff)
More work on track import and some cleaning up of ElementImporter interface
git-svn-id: svn://localhost/ardour2/branches/3.0@4265 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/element_importer.cc')
-rw-r--r--libs/ardour/element_importer.cc31
1 files changed, 30 insertions, 1 deletions
diff --git a/libs/ardour/element_importer.cc b/libs/ardour/element_importer.cc
index 0312f0ef15..af8dd770da 100644
--- a/libs/ardour/element_importer.cc
+++ b/libs/ardour/element_importer.cc
@@ -37,7 +37,7 @@ sigc::signal <bool, string> ElementImporter::Prompt;
ElementImporter::ElementImporter (XMLTree const & source, ARDOUR::Session & session) :
source (source),
session(session),
- queued (false),
+ _queued (false),
_broken (false)
{
// Get samplerate
@@ -49,6 +49,35 @@ ElementImporter::ElementImporter (XMLTree const & source, ARDOUR::Session & sess
}
}
+ElementImporter::~ElementImporter ()
+{
+ cancel_move ();
+}
+
+void
+ElementImporter::move ()
+{
+ if (!_queued) { return; }
+ _move ();
+}
+
+bool
+ElementImporter::prepare_move ()
+{
+ if (_queued) {
+ return true;
+ }
+ _queued = _prepare_move ();
+ return _queued;
+}
+
+void
+ElementImporter::cancel_move ()
+{
+ if (!_queued) { return; }
+ _cancel_move ();
+}
+
string
ElementImporter::smpte_to_string(SMPTE::Time & time) const
{