projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
when mingw is mingw64, it appears that we need to use __declspec() and not __attribut...
[ardour.git]
/
libs
/
evoral
/
evoral
/
midi_util.h
diff --git
a/libs/evoral/evoral/midi_util.h
b/libs/evoral/evoral/midi_util.h
index 27049f5c8ae6efde239afaac588c7d0b75df068d..5c72fb86c903918a6fdbc73508ac8ce65ed3961f 100644
(file)
--- a/
libs/evoral/evoral/midi_util.h
+++ b/
libs/evoral/evoral/midi_util.h
@@
-1,5
+1,5
@@
/* This file is part of Evoral.
/* This file is part of Evoral.
- * Copyright(C) 2008 Dav
e
Robillard <http://drobilla.net>
+ * Copyright(C) 2008 Dav
id
Robillard <http://drobilla.net>
* Copyright(C) 2000-2008 Paul Davis
*
* Evoral is free software; you can redistribute it and/or modify it under the
* Copyright(C) 2000-2008 Paul Davis
*
* Evoral is free software; you can redistribute it and/or modify it under the
@@
-19,11
+19,14
@@
#ifndef EVORAL_MIDI_UTIL_H
#define EVORAL_MIDI_UTIL_H
#ifndef EVORAL_MIDI_UTIL_H
#define EVORAL_MIDI_UTIL_H
+#include <iostream>
+
#include <stdint.h>
#include <stdint.h>
-#include <stdbool.h>
#include <string>
#include <sys/types.h>
#include <assert.h>
#include <string>
#include <sys/types.h>
#include <assert.h>
+
+#include "evoral/visibility.h"
#include "evoral/midi_events.h"
namespace Evoral {
#include "evoral/midi_events.h"
namespace Evoral {
@@
-66,9
+69,11
@@
midi_event_size(uint8_t status)
return 1;
case MIDI_CMD_COMMON_SYSEX:
return 1;
case MIDI_CMD_COMMON_SYSEX:
+ std::cerr << "event size called for sysex\n";
return -1;
}
return -1;
}
+ std::cerr << "event size called for unknown status byte " << std::hex << (int) status << "\n";
return -1;
}
return -1;
}
@@
-88,6
+93,7
@@
midi_event_size(const uint8_t* buffer)
// see http://www.midi.org/techspecs/midimessages.php
if (status == MIDI_CMD_COMMON_SYSEX) {
int end;
// see http://www.midi.org/techspecs/midimessages.php
if (status == MIDI_CMD_COMMON_SYSEX) {
int end;
+
for (end = 1; buffer[end] != MIDI_CMD_COMMON_SYSEX_END; end++) {
assert((buffer[end] & 0x80) == 0);
}
for (end = 1; buffer[end] != MIDI_CMD_COMMON_SYSEX_END; end++) {
assert((buffer[end] & 0x80) == 0);
}
@@
-115,7
+121,7
@@
midi_event_is_valid(const uint8_t* buffer, size_t len)
return true;
}
return true;
}
-std::string midi_note_name (uint8_t noteval);
+
LIBEVORAL_API
std::string midi_note_name (uint8_t noteval);
} // namespace Evoral
} // namespace Evoral