summaryrefslogtreecommitdiff
path: root/libs/ardour/source_factory.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-12-14 14:15:43 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-12-14 14:15:43 +0000
commitaf12adb34f62dc82f694a03ea3b2a6c99ba426ef (patch)
tree263ecb66462ee561c9e3741799541f0233f82e21 /libs/ardour/source_factory.cc
parentc0924280e9be867253a1b93eb7274e0eb955de5f (diff)
use shared_ptr for all Playlist handling; cleanup works again
git-svn-id: svn://localhost/ardour2/trunk@1209 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r--libs/ardour/source_factory.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index cb36d3cc35..9b8382c39f 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -83,10 +83,13 @@ boost::shared_ptr<Source>
SourceFactory::create (Session& s, const XMLNode& node)
{
boost::shared_ptr<Source> ret (new SndFileSource (s, node));
+
if (setup_peakfile (ret)) {
return boost::shared_ptr<Source>();
}
+
SourceCreated (ret);
+
return ret;
}
@@ -141,12 +144,15 @@ boost::shared_ptr<Source>
SourceFactory::createReadable (Session& s, string idstr, AudioFileSource::Flag flags, bool announce)
{
boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
+
if (setup_peakfile (ret)) {
return boost::shared_ptr<Source>();
}
+
if (announce) {
SourceCreated (ret);
}
+
return ret;
}