diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 14:09:01 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 14:09:12 -0400 |
commit | b3c78e906c33aa1cdc8e48f9b642f197e356e634 (patch) | |
tree | 2a32e53e79f7d221241dd06b67f62eaad106bdc4 /libs/ardour/session_state.cc | |
parent | 9a3cf7a10bfad6fe2876867f211e44c808026247 (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).
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 96f0e55199..b4dce43327 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1907,8 +1907,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; } } |