diff options
Diffstat (limited to 'test/lv2_test_host.cc')
-rw-r--r-- | test/lv2_test_host.cc | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/test/lv2_test_host.cc b/test/lv2_test_host.cc index 927f94c..375ae40 100644 --- a/test/lv2_test_host.cc +++ b/test/lv2_test_host.cc @@ -40,17 +40,7 @@ // #include <openssl/bio.h> #include <openssl/err.h> - -#ifdef final -// final is used as variable name in evp.h so we need to undef it before we -// include it. - #undef final - #include <openssl/evp.h> - #define final -#else - #include <openssl/evp.h> -#endif - +#include <openssl/evp.h> #include <string> class Base64 { public: @@ -176,10 +166,11 @@ void LV2TestHost::Sequence::clear() // Keep this to support atom extension from lv2 < 1.10 static inline LV2_Atom_Event* _lv2_atom_sequence_append_event(LV2_Atom_Sequence* seq, - uint32_t capacity, - const LV2_Atom_Event* event) + uint32_t capacity, + const LV2_Atom_Event* event) { const uint32_t total_size = (uint32_t)sizeof(*event) + event->body.size; + if (capacity - seq->atom.size < total_size) { return NULL; } @@ -205,7 +196,7 @@ void LV2TestHost::Sequence::addMidiNote(uint64_t pos, MIDINoteEvent ev; ev.event.time.frames = pos;// sample position ev.event.body.type = map.map(map.handle, LV2_MIDI__MidiEvent); - ev.event.body.size = sizeof(MIDINoteEvent); + ev.event.body.size = sizeof(ev.msg); ev.msg[0] = note_on; ev.msg[1] = key; |