From 022818b4a796f52c0a91eea42e65aec0bc7bed43 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 17 Feb 2009 02:11:49 +0000 Subject: Fix the horrible mess that was anything related to sources and paths. Most significant changes: - Factor out FileSource from AudioFileSource, use for SMFSource too - Explicitly pass embedded rather than mysterious name mangling or whatever - Destroy a ton of duplicated or very-nearly-duplicated code - Clean up and document all that weird source stuff in session.cc git-svn-id: svn://localhost/ardour2/branches/3.0@4609 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/import.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'libs/ardour/import.cc') diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index f983352d58..92ecaec753 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -217,13 +217,10 @@ create_mono_sources_for_writing (const vector& new_paths, Session& sess, const DataType type = ((*i).rfind(".mid") != string::npos) ? DataType::MIDI : DataType::AUDIO; - source = SourceFactory::createWritable ( - type, - sess, - i->c_str(), + source = SourceFactory::createWritable (type, sess, + i->c_str(), true, false, // destructive - samplerate - ); + samplerate); } catch (const failed_constructor& err) { @@ -365,7 +362,7 @@ write_midi_data_to_new_files (Evoral::SMF* source, Session::ImportStatus& status } } catch (...) { - error << "Corrupt MIDI file " << source->path() << endl; + error << "Corrupt MIDI file " << source->file_path() << endl; } } -- cgit v1.2.3