X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fplugins%2Freasonablesynth.lv2%2Flv2.c;h=4698cb9131c795352289004d5be0fb1ac8afeba8;hb=432e0073f6d8a91edb213e535c47a7e4ff686284;hp=6b9c81d8dd06a65df303dcfc9acdfde0a5480d7e;hpb=c43a1f39a639b57f805f64a7e6f5d364301ccc55;p=ardour.git diff --git a/libs/plugins/reasonablesynth.lv2/lv2.c b/libs/plugins/reasonablesynth.lv2/lv2.c index 6b9c81d8dd..4698cb9131 100644 --- a/libs/plugins/reasonablesynth.lv2/lv2.c +++ b/libs/plugins/reasonablesynth.lv2/lv2.c @@ -100,7 +100,7 @@ instantiate(const LV2_Descriptor* descriptor, self->synth = synth_alloc(); synth_init(self->synth, rate); - +#ifndef PLATFORM_WINDOWS // easter egg is for sane platforms with native support for localtime_r only struct tm date; time_t now; time(&now); @@ -109,6 +109,7 @@ instantiate(const LV2_Descriptor* descriptor, printf("reasonable synth.lv2 says: happy holidays!\n"); self->xmas = true; } +#endif return (LV2_Handle)self; } @@ -146,7 +147,7 @@ run(LV2_Handle handle, uint32_t n_samples) /* Process incoming MIDI events */ if (self->midiin) { - LV2_Atom_Event const* ev = (LV2_Atom_Event const*)((&(self->midiin)->body) + 1); // lv2_atom_sequence_begin + LV2_Atom_Event const* ev = (LV2_Atom_Event const*)((uintptr_t)((&(self->midiin)->body) + 1)); // lv2_atom_sequence_begin while( // !lv2_atom_sequence_is_end (const uint8_t*)ev < ((const uint8_t*) &(self->midiin)->body + (self->midiin)->atom.size) ) @@ -165,7 +166,7 @@ run(LV2_Handle handle, uint32_t n_samples) } } ev = (LV2_Atom_Event const*) // lv2_atom_sequence_next() - ((const uint8_t*)ev + sizeof(LV2_Atom_Event) + ((ev->body.size + 7) & ~7)); + ((uintptr_t)((const uint8_t*)ev + sizeof(LV2_Atom_Event) + ((ev->body.size + 7) & ~7))); } } @@ -199,7 +200,11 @@ static const LV2_Descriptor descriptor = { extension_data }; -LV2_SYMBOL_EXPORT +#if defined(COMPILER_MSVC) +__declspec(dllexport) +#else +__attribute__ ((visibility ("default"))) +#endif const LV2_Descriptor* lv2_descriptor(uint32_t idx) {