#include "pbd/stl_delete.h"
#include "pbd/strsplit.h"
-#include <pbd/gstdio_compat.h>
+#include "pbd/gstdio_compat.h"
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
if (init (_path, false)) {
throw failed_constructor ();
}
-
+
assert (!Glib::file_test (_path, Glib::FILE_TEST_EXISTS));
existence_check ();
if (init (_path, true)) {
throw failed_constructor ();
}
-
+
assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS));
existence_check ();
break;
}
time -= position;
-
+
ev.set(buf, size, time);
ev.set_event_type(midi_parameter_type(ev.buffer()[0]));
ev.set_id(Evoral::next_event_id());
return;
}
- /*printf("SMFSource: %s - append_event_beats ID = %d time = %lf, size = %u, data = ",
+#if 0
+ printf("SMFSource: %s - append_event_beats ID = %d time = %lf, size = %u, data = ",
name().c_str(), ev.id(), ev.time(), ev.size());
- for (size_t i = 0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");*/
+ for (size_t i = 0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");
+#endif
Evoral::Beats time = ev.time();
if (time < _last_ev_time_beats) {
static bool compile = true;
const int nmatches = 2;
regmatch_t matches[nmatches];
-
+
if (Glib::file_test (file, Glib::FILE_TEST_EXISTS)) {
if (!Glib::file_test (file, Glib::FILE_TEST_IS_REGULAR)) {
/* exists but is not a regular file */
} else {
compile = false;
}
-
+
if (regexec (&compiled_pattern, file.c_str(), nmatches, matches, 0)) {
return false;
}
ss += b;
}
- DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF %6 load model delta %1, time %2, size %3 buf %4, type %5\n",
- delta_t, time, size, ss , event_type, name()));
+ DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF %7 load model delta %1, time %2, size %3 buf %4, type %5 id %6\n",
+ delta_t, time, size, ss , event_type, event_id, name()));
#endif
eventlist.push_back(make_pair (
delete it->first;
}
+ // cerr << "----SMF-SRC-----\n";
+ // _playback_buf->dump (cerr);
+ // cerr << "----------------\n";
+
_model->end_write (Evoral::Sequence<Evoral::Beats>::ResolveStuckNotes, _length_beats);
_model->set_edited (false);
invalidate(lock);
/* Unlike the audio case, the MIDI file remains mutable (because we can
edit MIDI data)
*/
-
+
_flags = Flag (_flags & ~(Removable|RemovableIfEmpty|RemoveAtDestroy));
}
-
-
+
+