fix error in multiple calls to SourceFactory::createWritable()
removal of tape tracks removed an intermediate argument in the argument list; presence of default args for the
last two arguments and implicit conversion from int->bool prevented the compiler from complaining
about any existing calls.
This supplements/extends a54b000a70
This commit is contained in:
parent
3bbad66a99
commit
0f63b82943
@ -269,10 +269,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
||||
|
||||
|
||||
try {
|
||||
fs = boost::dynamic_pointer_cast<AudioFileSource> (
|
||||
SourceFactory::createWritable (DataType::AUDIO, *_session,
|
||||
path, true,
|
||||
false, _session->sample_rate()));
|
||||
fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (DataType::AUDIO, *_session, path, _session->sample_rate()));
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
@ -408,10 +405,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
|
||||
path = s;
|
||||
|
||||
try {
|
||||
fs = boost::dynamic_pointer_cast<AudioFileSource> (
|
||||
SourceFactory::createWritable (DataType::AUDIO, *_session,
|
||||
path, true,
|
||||
false, _session->sample_rate()));
|
||||
fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (DataType::AUDIO, *_session, path, _session->sample_rate()));
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
|
@ -86,7 +86,7 @@ Filter::make_new_sources (boost::shared_ptr<Region> region, SourceList& nsrcs, s
|
||||
|
||||
nsrcs.push_back (boost::dynamic_pointer_cast<Source> (
|
||||
SourceFactory::createWritable (region->data_type(), session,
|
||||
path, false, sample_rate)));
|
||||
path, sample_rate)));
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
|
@ -202,9 +202,7 @@ create_mono_sources_for_writing (const vector<string>& new_paths,
|
||||
try {
|
||||
const DataType type = SMFSource::safe_midi_file_extension (*i) ? DataType::MIDI : DataType::AUDIO;
|
||||
|
||||
source = SourceFactory::createWritable (type, sess,
|
||||
i->c_str(),
|
||||
samplerate);
|
||||
source = SourceFactory::createWritable (type, sess, i->c_str(), samplerate);
|
||||
}
|
||||
|
||||
catch (const failed_constructor& err) {
|
||||
|
@ -1055,10 +1055,9 @@ LuaAPI::Rubberband::process (luabridge::LuaRef cb)
|
||||
return rv;
|
||||
}
|
||||
try {
|
||||
_asrc.push_back (boost::dynamic_pointer_cast<AudioSource> (
|
||||
SourceFactory::createWritable (
|
||||
DataType::AUDIO, session,
|
||||
path, false, sample_rate)));
|
||||
|
||||
_asrc.push_back (boost::dynamic_pointer_cast<AudioSource> (SourceFactory::createWritable (DataType::AUDIO, session, path, sample_rate)));
|
||||
|
||||
} catch (failed_constructor& err) {
|
||||
cleanup (true);
|
||||
return rv;
|
||||
|
@ -145,9 +145,7 @@ MidiRegion::do_export (string path) const
|
||||
/* caller must check for pre-existing file */
|
||||
assert (!path.empty());
|
||||
assert (!Glib::file_test (path, Glib::FILE_TEST_EXISTS));
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(
|
||||
SourceFactory::createWritable(DataType::MIDI, _session,
|
||||
path, false, _session.sample_rate()));
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(SourceFactory::createWritable(DataType::MIDI, _session, path, _session.sample_rate()));
|
||||
|
||||
BeatsSamplesConverter bfc (_session.tempo_map(), _position);
|
||||
Temporal::Beats const bbegin = bfc.from (_start);
|
||||
@ -177,8 +175,7 @@ MidiRegion::clone (string path) const
|
||||
assert (!path.empty());
|
||||
assert (!Glib::file_test (path, Glib::FILE_TEST_EXISTS));
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(
|
||||
SourceFactory::createWritable(DataType::MIDI, _session,
|
||||
path, false, _session.sample_rate()));
|
||||
SourceFactory::createWritable(DataType::MIDI, _session, path, _session.sample_rate()));
|
||||
return clone (newsrc);
|
||||
}
|
||||
|
||||
|
@ -4907,8 +4907,7 @@ Session::create_audio_source_for_session (size_t n_chans, string const & base, u
|
||||
const string path = new_audio_source_path (base, n_chans, chan, true);
|
||||
|
||||
if (!path.empty()) {
|
||||
return boost::dynamic_pointer_cast<AudioFileSource> (
|
||||
SourceFactory::createWritable (DataType::AUDIO, *this, path, sample_rate(), true, true));
|
||||
return boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (DataType::AUDIO, *this, path, sample_rate(), true, true));
|
||||
} else {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
@ -4921,9 +4920,7 @@ Session::create_midi_source_for_session (string const & basic_name)
|
||||
const string path = new_midi_source_path (basic_name);
|
||||
|
||||
if (!path.empty()) {
|
||||
return boost::dynamic_pointer_cast<SMFSource> (
|
||||
SourceFactory::createWritable (
|
||||
DataType::MIDI, *this, path, false, sample_rate()));
|
||||
return boost::dynamic_pointer_cast<SMFSource> (SourceFactory::createWritable (DataType::MIDI, *this, path, sample_rate()));
|
||||
} else {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
@ -4966,9 +4963,7 @@ Session::create_midi_source_by_stealing_name (boost::shared_ptr<Track> track)
|
||||
|
||||
const string path = Glib::build_filename (source_search_path (DataType::MIDI).front(), name);
|
||||
|
||||
return boost::dynamic_pointer_cast<SMFSource> (
|
||||
SourceFactory::createWritable (
|
||||
DataType::MIDI, *this, path, false, sample_rate()));
|
||||
return boost::dynamic_pointer_cast<SMFSource> (SourceFactory::createWritable (DataType::MIDI, *this, path, sample_rate()));
|
||||
}
|
||||
|
||||
bool
|
||||
@ -5726,7 +5721,7 @@ Session::write_one_track (Track& track, samplepos_t start, samplepos_t end,
|
||||
}
|
||||
|
||||
try {
|
||||
source = SourceFactory::createWritable (data_type, *this, path, false, sample_rate());
|
||||
source = SourceFactory::createWritable (data_type, *this, path, sample_rate());
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
|
@ -42,7 +42,7 @@ AudioRegionTest::setUp ()
|
||||
std::string const test_wav_path = Glib::build_filename (new_test_output_dir(), "test.wav");
|
||||
_playlist = PlaylistFactory::create (DataType::AUDIO, *_session, "test");
|
||||
_audio_playlist = boost::dynamic_pointer_cast<AudioPlaylist> (_playlist);
|
||||
_source = SourceFactory::createWritable (DataType::AUDIO, *_session, test_wav_path, false, get_test_sample_rate ());
|
||||
_source = SourceFactory::createWritable (DataType::AUDIO, *_session, test_wav_path, get_test_sample_rate ());
|
||||
|
||||
/* Write a staircase to the source */
|
||||
|
||||
|
@ -119,9 +119,7 @@ ensure_per_region_source (Session* session, boost::shared_ptr<MidiRegion> region
|
||||
<< " for region " << region->name() << endl;
|
||||
|
||||
} else {
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(
|
||||
SourceFactory::createWritable(DataType::MIDI, *session,
|
||||
newsrc_path, false, session->sample_rate()));
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(SourceFactory::createWritable(DataType::MIDI, *session, newsrc_path, session->sample_rate()));
|
||||
|
||||
if (!newsrc) {
|
||||
cout << UTILNAME << ":" << endl
|
||||
@ -175,8 +173,7 @@ ensure_per_source_source (Session* session, boost::shared_ptr<MidiRegion> region
|
||||
} else {
|
||||
|
||||
newsrc = boost::dynamic_pointer_cast<MidiSource>(
|
||||
SourceFactory::createWritable(DataType::MIDI, *session,
|
||||
newsrc_path, false, session->sample_rate()));
|
||||
SourceFactory::createWritable(DataType::MIDI, *session, newsrc_path, session->sample_rate()));
|
||||
if (!newsrc) {
|
||||
cout << UTILNAME << ":" << endl
|
||||
<<" An error occurred creating writeable source " << newsrc_path << " exiting." << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user