projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
027d0ef
)
system common and system realtime messages are not valid in SMF files
author
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 5 Jul 2018 17:45:06 +0000
(13:45 -0400)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 5 Jul 2018 17:45:17 +0000
(13:45 -0400)
libs/evoral/src/SMF.cpp
patch
|
blob
|
history
diff --git
a/libs/evoral/src/SMF.cpp
b/libs/evoral/src/SMF.cpp
index b4fa4a16c818a32e54e453c8894f8a853ebe909b..9bffa598050951392982ce721e1af984709f5603 100644
(file)
--- a/
libs/evoral/src/SMF.cpp
+++ b/
libs/evoral/src/SMF.cpp
@@
-367,6
+367,26
@@
SMF::append_event_delta(uint32_t delta_t, uint32_t size, const uint8_t* buf, eve
printf("%X ", buf[i]);
} printf("\n"); */
+ switch (buf[0]) {
+ case 0xf1:
+ case 0xf2:
+ case 0xf3:
+ case 0xf4:
+ case 0xf5:
+ case 0xf6:
+ case 0xf8:
+ case 0xf9:
+ case 0xfa:
+ case 0xfb:
+ case 0xfc:
+ case 0xfd:
+ case 0xfe:
+ case 0xff:
+ /* System Real Time or System Common event: not valid in SMF
+ */
+ return;
+ }
+
if (!midi_event_is_valid(buf, size)) {
cerr << "WARNING: SMF ignoring illegal MIDI event" << endl;
return;