Hi,
I'm interested in the goal of using Windows VST/VSTi audio plugins on my Intel Mac in OS X. I found the fst project, did some porting, and managed to get a few VSTs to work, which had me pretty stoked. Thanks to the FST folks and the Wine team for making this possible!
On the other hand, I'd rather have the option of running the plugins in-process with my DAW software instead of as separate processes connected by JACK. I can imagine a super-thin layer of code that just translates calls between the plugin and the host and allows the plugin to access the Win32 API.
In case I'm being unclear, here's how it breaks down. There's a host application that's native OS X and knows nothing about Wine. I'd like to write a plugin that, when it's loaded, will load a windows dll. The host will call into the plugin, which will call into the dll. The dll will make upcalls to the plugin, which will in turn call up to the host. The dll will probably be running a windows gui as well and making calls to various windows APIs.
So is this possible? I'm pretty new to Wine and Windows programming so forgive me if the answer to this question is obvious. I've seen plenty of examples of how to build and run .exes that are windows programs from the ground up, but I've never seen wine used as part of a plugin. If it's possible, can you point me to any examples? What are the relevant parts of Wine I should look at?
Thanks, -n8
--
-- Nathaniel Gray -- Caltech Computer Science ------> -- Mojave Project -- http://mojave.cs.caltech.edu -->
Hi,
In case I'm being unclear, here's how it breaks down. There's a host application that's native OS X and knows nothing about Wine. I'd like to write a plugin that, when it's loaded, will load a windows dll. The host will call into the plugin, which will call into the dll. The dll will make upcalls to the plugin, which will in turn call up to the host. The dll will probably be running a windows gui as well and making calls to various windows APIs.
So is this possible? I'm pretty new to Wine and Windows programming so forgive me if the answer to this question is obvious.
Yes, this is possible. I wanted to build a wrapper from Palm Desktop to pilot-link some time ago to use Documents To Go with pilot-link, but I gave up on the lack of time(and re-entered wine with d3d some time later).
The main issue you have is that your plugin, that loads the dll, needs to run in Wine's environment in order to be able to load the dll. So you have to write a winelib dll. If the plugin is loaded as a library in your host app, the whole host app would have to be a winelib app. Not good :-(
So you can split your plugin into two parts, one is the plugin that runs in the host app, the other one is a seperate winelib application that runs in a seperate process and loads the win32 dll. That way the dll gets the virtual memory setup it needs. The two parts of your plugin can use any Unix IPC techniques you feel like using - sockets, pipes, shared memory, semaphores, whatever. You could forward function calls using pipes, transport bigger blobs using shared memory, and synchronise everything using semaphores(and implicit pipe synchronisation).