summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-09-15 14:09:01 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-09-15 18:24:54 -0400
commit2c00c0c0252022769a4bf3eb76856b494205c81a (patch)
tree84f0e4d6b2291a418c34fb63465ec85a339a6998
parent68d362fd2701ec2e7560ab43dcf4a8f86670671d (diff)
if a (file) source really cannot be found, differentiate between audio & MIDI.
For now, recovering from missing MIDI is a no-can-do situation (because MIDI is inherently data-editable).
-rw-r--r--libs/ardour/session_state.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index c985f8810a..6c5734db10 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1879,8 +1879,19 @@ Session::load_sources (const XMLNode& node)
case -1:
default:
- warning << _("A sound file is missing. It will be replaced by silence.") << endmsg;
- source = SourceFactory::createSilent (*this, **niter, max_framecnt, _current_frame_rate);
+ switch (err.type) {
+
+ case DataType::AUDIO:
+ warning << _("A sound file is missing. It will be replaced by silence.") << endmsg;
+ source = SourceFactory::createSilent (*this, **niter, max_framecnt, _current_frame_rate);
+ break;
+
+ case DataType::MIDI:
+ warning << string_compose (_("A MIDI file is missing. %1 cannot currently recover from missing MIDI files"),
+ PROGRAM_NAME) << endmsg;
+ return -1;
+ break;
+ }
break;
}
}