diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-10 10:07:04 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-10 10:07:04 -0400 |
commit | 107e0d6d02333cd9947ddba4120af95175e5643e (patch) | |
tree | 832ae77039f98979ab9059494523e1b06e318a67 /libs/ardour/audiofilesource.cc | |
parent | 3f38a602cc4a6170dda7c19f7dd14f11717d5c9b (diff) |
fix crash recovery: add new constructors to SndFileSource, AudioFileSource, add a new SourceFactory method and finally tweak
AudioDiskstream::use_pending_capture_data() to create both the required whole-file and the in-playlist regions
Diffstat (limited to 'libs/ardour/audiofilesource.cc')
-rw-r--r-- | libs/ardour/audiofilesource.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc index 014baa9031..299b5a2bb5 100644 --- a/libs/ardour/audiofilesource.cc +++ b/libs/ardour/audiofilesource.cc @@ -115,6 +115,22 @@ AudioFileSource::AudioFileSource (Session& s, const string& path, const string& } } +/** Constructor used for existing internal-to-session files during crash + * recovery. File must exist + */ +AudioFileSource::AudioFileSource (Session& s, const string& path, Source::Flag flags, bool /* ignored-exists-for-prototype differentiation */) + : Source (s, DataType::AUDIO, path, flags) + , AudioSource (s, path) + , FileSource (s, DataType::AUDIO, path, string(), flags) +{ + /* note that origin remains empty */ + + if (init (_path, true)) { + throw failed_constructor (); + } +} + + /** Constructor used for existing internal-to-session files via XML. File must exist. */ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exist) : Source (s, node) |