#include "gain_meter.h"
#include "main_clock.h"
#include "public_editor.h"
+#include "timers.h"
#include "sfdb_freesound_mootcher.h"
if (SMFSource::valid_midi_file (path)) {
- boost::shared_ptr<SMFSource> ms =
- boost::dynamic_pointer_cast<SMFSource> (
- SourceFactory::createExternal (DataType::MIDI, *_session,
- path, 0, Source::Flag (0), false));
+ boost::shared_ptr<SMFSource> ms;
+ try {
+ ms = boost::dynamic_pointer_cast<SMFSource> (
+ SourceFactory::createExternal (DataType::MIDI, *_session,
+ path, 0, Source::Flag (0), false));
+ } catch (const std::exception& e) {
+ error << string_compose(_("Could not read file: %1 (%2)."),
+ path, e.what()) << endmsg;
+ }
preview_label.set_markup (_("<b>Midi File Information</b>"));
void
SoundFileBrowser::start_metering ()
{
- metering_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (sigc::mem_fun(*this, &SoundFileBrowser::meter));
+ metering_connection = Timers::super_rapid_connect (sigc::mem_fun(*this, &SoundFileBrowser::meter));
}
void