summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/audiofilesource.h6
-rw-r--r--libs/ardour/ardour/sndfilesource.h11
-rw-r--r--libs/ardour/ardour/source_factory.h3
3 files changed, 19 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index e0a199fd72..4831eb2081 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -94,6 +94,12 @@ protected:
/** Constructor to be called for existing in-session files */
AudioFileSource (Session&, const XMLNode&, bool must_exist = true);
+ /** Constructor to be called for crash recovery. Final argument is not
+ * used but exists to differentiate from the external-to-session
+ * constructor above.
+ */
+ AudioFileSource (Session&, const std::string& path, Source::Flag flags, bool);
+
int init (const std::string& idstr, bool must_exist);
virtual void set_header_timeline_position () = 0;
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index 25b8f003b2..831f8db5f7 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -38,7 +38,16 @@ class LIBARDOUR_API SndFileSource : public AudioFileSource {
SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
Flag flags = SndFileSource::default_writable_flags);
- /** Constructor to be called for existing in-session files */
+ /* Constructor to be called for recovering files being used for
+ * capture. They are in-session, they already exist, they should not
+ * be writable. They are an odd hybrid (from a constructor point of
+ * view) of the previous two constructors.
+ */
+ SndFileSource (Session&, const std::string& path, int chn);
+
+ /** Constructor to be called for existing in-session files during
+ * session loading
+ */
SndFileSource (Session&, const XMLNode&);
~SndFileSource ();
diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h
index 4ef2cd60ee..614fdce7b1 100644
--- a/libs/ardour/ardour/source_factory.h
+++ b/libs/ardour/ardour/source_factory.h
@@ -57,6 +57,9 @@ class LIBARDOUR_API SourceFactory {
bool destructive, framecnt_t rate, bool announce = true, bool async = false);
+ static boost::shared_ptr<Source> createForRecovery
+ (DataType type, Session&, const std::string& path, int chn);
+
static boost::shared_ptr<Source> createFromPlaylist
(DataType type, Session& s, boost::shared_ptr<Playlist> p, const PBD::ID& orig, const std::string& name,
uint32_t chn, frameoffset_t start, framecnt_t len, bool copy, bool defer_peaks);