RustAudio / vst-rs

VST 2.4 API implementation in rust. Create plugins or hosts. Previously rust-vst on the RustDSP group.
MIT License
1.04k stars 91 forks source link

Rework `SendEventBuffer` to make it useable in `Plugin::process_events` #160

Closed Boscop closed 3 years ago

Boscop commented 3 years ago

This PR makes SendEventBuffer::store_events and SendEventBuffer::events public, so that SendEventBuffer can be used to feed midi input events from Plugin::process_events to Plugin::process without allocating memory each frame. (See the adjusted fwd_midi example, which now doesn't allocate memory each frame for the midi events, but uses SendEventBuffer for midi input events.)

I also removed the (now unused) send_events_to_plugin method (which was used a while ago when SendEventBuffer was a member in PluginCache to feed midi events to Plugin::process_events).