13
0

API consistency, prefer typedef'ed event_id_t

This commit is contained in:
Robin Gareus 2021-03-19 06:29:03 +01:00
parent 5a4ef850ce
commit 4887350e0d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 7 additions and 7 deletions

View File

@ -307,8 +307,8 @@ public:
boost::shared_ptr<Evoral::Note<TimeType> > find_note (NotePtr);
PatchChangePtr find_patch_change (Evoral::event_id_t);
boost::shared_ptr<Evoral::Note<TimeType> > find_note (gint note_id);
boost::shared_ptr<Evoral::Event<TimeType> > find_sysex (gint);
boost::shared_ptr<Evoral::Note<TimeType> > find_note (Evoral::event_id_t);
boost::shared_ptr<Evoral::Event<TimeType> > find_sysex (Evoral::event_id_t);
InsertMergePolicy insert_merge_policy () const;
void set_insert_merge_policy (InsertMergePolicy);

View File

@ -1380,7 +1380,7 @@ MidiModel::find_note (NotePtr other)
}
Evoral::Sequence<MidiModel::TimeType>::NotePtr
MidiModel::find_note (gint note_id)
MidiModel::find_note (Evoral::event_id_t note_id)
{
/* used only for looking up notes when reloading history from disk,
so we don't care about performance *too* much.
@ -1408,7 +1408,7 @@ MidiModel::find_patch_change (Evoral::event_id_t id)
}
boost::shared_ptr<Evoral::Event<MidiModel::TimeType> >
MidiModel::find_sysex (gint sysex_id)
MidiModel::find_sysex (Evoral::event_id_t sysex_id)
{
/* used only for looking up notes when reloading history from disk,
so we don't care about performance *too* much.

View File

@ -254,7 +254,7 @@ SMFSource::read_unlocked (const Lock& lock,
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF read_unlocked: seek to %1\n", start));
Evoral::SMF::seek_to_start();
while (time < start_ticks) {
gint ignored;
Evoral::event_id_t ignored;
ret = read_event(&ev_delta_t, &ev_size, &ev_buffer, &ignored);
if (ret == -1) { // EOF
@ -271,7 +271,7 @@ SMFSource::read_unlocked (const Lock& lock,
_smf_last_read_end = start + duration;
while (true) {
gint ignored; /* XXX don't ignore note id's ??*/
Evoral::event_id_t ignored; /* XXX don't ignore note id's ??*/
ret = read_event(&ev_delta_t, &ev_size, &ev_buffer, &ignored);
if (ret == -1) { // EOF
@ -657,7 +657,7 @@ SMFSource::load_model (const Glib::Threads::Mutex::Lock& lock, bool force_reload
uint32_t size = 0;
uint8_t* buf = NULL;
int ret;
gint event_id;
Evoral::event_id_t event_id;
bool have_event_id;
// TODO simplify event allocation