summaryrefslogtreecommitdiff
path: root/libs/ardour/source_factory.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-09-07 15:07:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-09-07 15:07:14 +0000
commitf2c8ae66c09d2caffa44743eef0a0ab873024d9a (patch)
tree8118a863600071cc545b4a127e7bb13d3e2c75fe /libs/ardour/source_factory.cc
parentbabf75d871ee253fbe32c50737aa110a4fffa36f (diff)
remove all duplicated _id members from children of PBD::Stateful.
Sources now know about Session. rearrange session directory heirarchy. remove tape_dir stuff. NSD allows absolute/relative paths to be typed straight into the text entry. Session history reloaded after all 3rd party registrations done. Editor restores its ID; other objects still need this. use g_mkdir_with_parents() instead of mkdir() one example of using g_file_test() instead of access. git-svn-id: svn://localhost/ardour2/trunk@908 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r--libs/ardour/source_factory.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index e5bbe96d5e..c7539a1370 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -36,25 +36,25 @@ sigc::signal<void,boost::shared_ptr<Source> > SourceFactory::SourceCreated;
#ifdef HAVE_COREAUDIO
boost::shared_ptr<Source>
-SourceFactory::create (const XMLNode& node)
+SourceFactory::create (Session& s, const XMLNode& node)
{
if (node.property (X_("destructive")) != 0) {
- boost::shared_ptr<Source> ret (new DestructiveFileSource (node));
+ boost::shared_ptr<Source> ret (new DestructiveFileSource (s, node));
SourceCreated (ret);
return ret;
} else {
try {
- boost::shared_ptr<Source> ret (new CoreAudioSource (node));
+ boost::shared_ptr<Source> ret (new CoreAudioSource (s, node));
SourceCreated (ret);
return ret;
}
catch (failed_constructor& err) {
- boost::shared_ptr<Source> ret (new SndFileSource (node));
+ boost::shared_ptr<Source> ret (new SndFileSource (s, node));
SourceCreated (ret);
return ret;
}
@@ -66,17 +66,17 @@ SourceFactory::create (const XMLNode& node)
#else
boost::shared_ptr<Source>
-SourceFactory::create (const XMLNode& node)
+SourceFactory::create (Session& s, const XMLNode& node)
{
if (node.property (X_("destructive")) != 0) {
- boost::shared_ptr<Source> ret (new DestructiveFileSource (node));
+ boost::shared_ptr<Source> ret (new DestructiveFileSource (s, node));
SourceCreated (ret);
return ret;
} else {
- boost::shared_ptr<Source> ret (new SndFileSource (node));
+ boost::shared_ptr<Source> ret (new SndFileSource (s, node));
SourceCreated (ret);
return ret;
}
@@ -86,10 +86,10 @@ SourceFactory::create (const XMLNode& node)
#ifdef HAVE_COREAUDIO
boost::shared_ptr<Source>
-SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool announce)
+SourceFactory::createReadable (Session& s, string idstr, AudioFileSource::Flag flags, bool announce)
{
if (flags & Destructive) {
- boost::shared_ptr<Source> ret (new DestructiveFileSource (idstr, flags));
+ boost::shared_ptr<Source> ret (new DestructiveFileSource (s, idstr, flags));
if (announce) {
SourceCreated (ret);
}
@@ -97,7 +97,7 @@ SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool a
}
try {
- boost::shared_ptr<Source> ret (new CoreAudioSource (idstr, flags));
+ boost::shared_ptr<Source> ret (new CoreAudioSource (s, idstr, flags));
if (announce) {
SourceCreated (ret);
}
@@ -105,7 +105,7 @@ SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool a
}
catch (failed_constructor& err) {
- boost::shared_ptr<Source> ret (new SndFileSource (idstr, flags));
+ boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
if (announce) {
SourceCreated (ret);
}
@@ -118,9 +118,9 @@ SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool a
#else
boost::shared_ptr<Source>
-SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool announce)
+SourceFactory::createReadable (Session& s, string idstr, AudioFileSource::Flag flags, bool announce)
{
- boost::shared_ptr<Source> ret (new SndFileSource (idstr, flags));
+ boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
if (announce) {
SourceCreated (ret);
}
@@ -130,12 +130,12 @@ SourceFactory::createReadable (string idstr, AudioFileSource::Flag flags, bool a
#endif // HAVE_COREAUDIO
boost::shared_ptr<Source>
-SourceFactory::createWritable (std::string path, bool destructive, jack_nframes_t rate, bool announce)
+SourceFactory::createWritable (Session& s, std::string path, bool destructive, jack_nframes_t rate, bool announce)
{
/* this might throw failed_constructor(), which is OK */
if (destructive) {
- boost::shared_ptr<Source> ret (new DestructiveFileSource (path,
+ boost::shared_ptr<Source> ret (new DestructiveFileSource (s, path,
Config->get_native_file_data_format(),
Config->get_native_file_header_format(),
rate));
@@ -145,7 +145,7 @@ SourceFactory::createWritable (std::string path, bool destructive, jack_nframes_
return ret;
} else {
- boost::shared_ptr<Source> ret (new SndFileSource (path,
+ boost::shared_ptr<Source> ret (new SndFileSource (s, path,
Config->get_native_file_data_format(),
Config->get_native_file_header_format(),
rate));