Necessary changes and fixes to make synth plugins #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a couple of changes that were necessary to compile synthesizer plugins with the vst2 package (to resolve #61):
The events field in the structure Events in vst.h was defined wrong; it was void** events where as it should have been void* events[]. In other words: it should be a variable size structure, with some "header", followed by a list of pointers, and should be allocated with a single calloc (and freed with a single free).
The user has now mechanism to define arbitrary PluginFlags; specifically, to enable defining vst2.PluginIsSynth flag for the synth
I also gave the user a way to define a callback function for responding to PlugCanDo opcode. In my case, I use it to respond positively to vst2.PluginCanReceiveEvents, vst2.PluginCanReceiveMIDIEvent, and vst2.PluginCanReceiveTimeInfo
Finally, I gave the user a way to define a callback function for responding to PlugProcessEvents opcodes, to receive MIDI events from the host.