RustAudio/vst-rs

how does `open()` in `Editor` work?

Closed this issue · 4 comments

Hi,

I'm currently trying to build a VST-Host for my application. However, i can not get the plugin's interface to show up. But I have to admit that I'm not really sure which pointer to pass into the open() function as a parent.

Is it currently possible to get the interface? If yes, how? Maybe there is some sample code in an existing open-source project?

Thanks for any help!
cheers

I think the pointer should be the raw window handle, which will be different on each OS. There's a bit about it in the wiki: https://github.com/RustAudio/vst-rs/wiki/VST2-Guis

k-bx commented

Has anyone figured this one out? Here are my failed attempts on macOS https://github.com/k-bx/diminuendo-vsthost/blob/f8bc396f3e596bf44b828e857a6bb6e016832e09/src/main.rs

@schell is correct, the wiki's info is accurate AFAIK.

It's a platform-specific window, so you have to create the window with your platform's "native" window API. In Windows, for example, I've used the winapi crate to get a window working.

I have a bunch of really old examples at https://github.com/crsaracco/vst2-gui-prototypes -- I don't really touch this crate all too much anymore though, so my memory of the details of getting this working is fading. (I also didn't get too far on MacOS, unfortunately.)

Closing as the question has been answered. For anyone looking, take a look at baseview, iced-audio, etc. Lots of GUI options now as well.