mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add a logger to the Wine VST2 bridge
This commit is contained in:
@@ -70,6 +70,7 @@ Vst2Bridge::Vst2Bridge(MainContext& main_context,
|
||||
std::string plugin_dll_path,
|
||||
std::string endpoint_base_dir)
|
||||
: HostBridge(plugin_dll_path),
|
||||
logger(generic_logger),
|
||||
main_context(main_context),
|
||||
plugin_handle(LoadLibrary(plugin_dll_path.c_str()), FreeLibrary),
|
||||
sockets(main_context.context, endpoint_base_dir, false) {
|
||||
|
||||
@@ -75,6 +75,16 @@ class Vst2Bridge : public HostBridge {
|
||||
*/
|
||||
intptr_t host_callback(AEffect*, int, int, intptr_t, void*, float);
|
||||
|
||||
private:
|
||||
/**
|
||||
* A logger instance we'll use log cached `audioMasterGetTime()` calls, so
|
||||
* they can be hidden on verbosity levels below 2.
|
||||
*
|
||||
* This only has to be used instead of directly writing to `std::cerr` when
|
||||
* the message should be hidden on lower verbosity levels.
|
||||
*/
|
||||
Vst2Logger logger;
|
||||
|
||||
/**
|
||||
* With the `audioMasterGetTime` host callback the plugin expects the return
|
||||
* value from the calblack to be a pointer to a VstTimeInfo struct. If the
|
||||
@@ -83,7 +93,6 @@ class Vst2Bridge : public HostBridge {
|
||||
*/
|
||||
std::optional<VstTimeInfo> time_info;
|
||||
|
||||
private:
|
||||
/**
|
||||
* A wrapper around `plugin->dispatcher` that handles the opening and
|
||||
* closing of GUIs. Used inside of `handle_dispatch()`.
|
||||
|
||||
Reference in New Issue
Block a user