// yabridge: a Wine VST bridge // Copyright (C) 2020 Robbert van der Helm // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include "vst3.h" #include "../boost-fix.h" #include "vst3-impls.h" #include Vst3Bridge::Vst3Bridge(MainContext& main_context, std::string plugin_dll_path, std::string endpoint_base_dir) : HostBridge(plugin_dll_path), main_context(main_context), sockets(main_context.context, endpoint_base_dir, false) { std::string error; module = VST3::Hosting::Win32Module::create(plugin_dll_path, error); if (!module) { throw std::runtime_error("Could not load the VST3 module for '" + plugin_dll_path + "': " + error); } sockets.connect(); // Fetch this instance's configuration from the plugin to finish the setup // process config = sockets.vst_host_callback.send_message(WantsConfiguration{}, std::nullopt); } void Vst3Bridge::run() { // TODO: Remove, this is just for type checking if (false) { boost::asio::local::stream_protocol::socket* socket; Steinberg::IPtr factory; YaPluginFactoryHostImpl object(factory); write_object(*socket, object); } // TODO: Handle events // sockets.host_vst_control.receive_messages( // std::nullopt, [&](ControlRequest request) -> ControlResponse { // }); std::cerr << "TODO: Not yet implemented" << std::endl; }