mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-15 16:03:55 +02:00
Fix capitalization of the word MIDI
This commit is contained in:
@@ -248,7 +248,7 @@ process works as follows:
|
|||||||
`opcode=effProcessEvents`. These get forwarded to the Windows VST plugin
|
`opcode=effProcessEvents`. These get forwarded to the Windows VST plugin
|
||||||
through the Wine VST host. This has to be handled separately from all other
|
through the Wine VST host. This has to be handled separately from all other
|
||||||
events because of limitations of the Win32 API. Otherwise the plugin would
|
events because of limitations of the Win32 API. Otherwise the plugin would
|
||||||
not receive any midi events while the GUI is being resized or a dropdown
|
not receive any MIDI events while the GUI is being resized or a dropdown
|
||||||
menu or message box is open.
|
menu or message box is open.
|
||||||
- Host callback calls from the Windows VST plugin loaded into the Wine VST
|
- Host callback calls from the Windows VST plugin loaded into the Wine VST
|
||||||
host through the `audioMasterCallback` function. These get forwarded to the
|
host through the `audioMasterCallback` function. These get forwarded to the
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ constexpr size_t max_audio_channels = 32;
|
|||||||
*/
|
*/
|
||||||
constexpr size_t max_buffer_size = 16384;
|
constexpr size_t max_buffer_size = 16384;
|
||||||
/**
|
/**
|
||||||
* The maximum number of midi events in a single `VstEvents` struct.
|
* The maximum number of MIDI events in a single `VstEvents` struct.
|
||||||
*/
|
*/
|
||||||
constexpr size_t max_midi_events = max_buffer_size / sizeof(size_t);
|
constexpr size_t max_midi_events = max_buffer_size / sizeof(size_t);
|
||||||
/**
|
/**
|
||||||
@@ -160,7 +160,7 @@ class alignas(16) DynamicVstEvents {
|
|||||||
VstEvents& as_c_events();
|
VstEvents& as_c_events();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Midi events are sent in batches.
|
* MIDI events are sent in batches.
|
||||||
*/
|
*/
|
||||||
std::vector<VstEvent> events;
|
std::vector<VstEvent> events;
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ class alignas(16) DynamicVstEvents {
|
|||||||
* `vestige/aeffectx.h` the struct contains a single element `VstEvent`
|
* `vestige/aeffectx.h` the struct contains a single element `VstEvent`
|
||||||
* pointer array, but the actual length of this array is
|
* pointer array, but the actual length of this array is
|
||||||
* `VstEvents::numEvents`. Because there is no real limit on the number of
|
* `VstEvents::numEvents`. Because there is no real limit on the number of
|
||||||
* midi events the host can send at once we have to build this object on the
|
* MIDI events the host can send at once we have to build this object on the
|
||||||
* heap by hand.
|
* heap by hand.
|
||||||
*/
|
*/
|
||||||
std::vector<uint8_t> vst_events_buffer;
|
std::vector<uint8_t> vst_events_buffer;
|
||||||
@@ -221,7 +221,7 @@ struct WantsString {};
|
|||||||
* - An X11 window handle.
|
* - An X11 window handle.
|
||||||
* - Specific data structures from `aeffextx.h`. For instance an event with the
|
* - Specific data structures from `aeffextx.h`. For instance an event with the
|
||||||
* opcode `effProcessEvents` the hosts passes a `VstEvents` struct containing
|
* opcode `effProcessEvents` the hosts passes a `VstEvents` struct containing
|
||||||
* midi events, and `audioMasterIOChanged` lets the host know that the
|
* MIDI events, and `audioMasterIOChanged` lets the host know that the
|
||||||
* `AEffect` struct has changed.
|
* `AEffect` struct has changed.
|
||||||
*
|
*
|
||||||
* - Some empty buffer for the plugin to write its own data to, for instance for
|
* - Some empty buffer for the plugin to write its own data to, for instance for
|
||||||
|
|||||||
@@ -341,8 +341,8 @@ intptr_t HostBridge::dispatch(AEffect* /*plugin*/,
|
|||||||
}; break;
|
}; break;
|
||||||
case effProcessEvents:
|
case effProcessEvents:
|
||||||
// Because of limitations of the Win32 API we have to use a seperate
|
// Because of limitations of the Win32 API we have to use a seperate
|
||||||
// thread and socket to pass midi events. Otherwise plugins will
|
// thread and socket to pass MIDI events. Otherwise plugins will
|
||||||
// stop receiving midi data when they have an open dropdowns or
|
// stop receiving MIDI data when they have an open dropdowns or
|
||||||
// message box.
|
// message box.
|
||||||
return send_event(host_vst_dispatch_midi_events,
|
return send_event(host_vst_dispatch_midi_events,
|
||||||
dispatch_midi_events_mutex, converter,
|
dispatch_midi_events_mutex, converter,
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class HostBridge {
|
|||||||
* Used specifically for the `effProcessEvents` opcode. This is needed
|
* Used specifically for the `effProcessEvents` opcode. This is needed
|
||||||
* because the Win32 API is designed to block during certain GUI
|
* because the Win32 API is designed to block during certain GUI
|
||||||
* interactions such as resizing a window or opening a dropdown. Without
|
* interactions such as resizing a window or opening a dropdown. Without
|
||||||
* this midi input would just stop working at times.
|
* this MIDI input would just stop working at times.
|
||||||
*/
|
*/
|
||||||
boost::asio::local::stream_protocol::socket host_vst_dispatch_midi_events;
|
boost::asio::local::stream_protocol::socket host_vst_dispatch_midi_events;
|
||||||
boost::asio::local::stream_protocol::socket vst_host_callback;
|
boost::asio::local::stream_protocol::socket vst_host_callback;
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ PluginBridge::PluginBridge(std::string plugin_dll_path,
|
|||||||
write_object(vst_host_aeffect, *plugin);
|
write_object(vst_host_aeffect, *plugin);
|
||||||
|
|
||||||
// This works functionally identically to the `handle_dispatch()` function
|
// This works functionally identically to the `handle_dispatch()` function
|
||||||
// below, but this socket will only handle midi events. This is needed
|
// below, but this socket will only handle MIDI events. This is needed
|
||||||
// because of Win32 API limitations.
|
// because of Win32 API limitations.
|
||||||
dispatch_midi_events_handler =
|
dispatch_midi_events_handler =
|
||||||
Win32Thread(handle_dispatch_midi_events_proxy, this);
|
Win32Thread(handle_dispatch_midi_events_proxy, this);
|
||||||
@@ -188,8 +188,8 @@ void PluginBridge::handle_dispatch() {
|
|||||||
return plugin->dispatcher(plugin, opcode, index, value,
|
return plugin->dispatcher(plugin, opcode, index, value,
|
||||||
&events->as_c_events(), option);
|
&events->as_c_events(), option);
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "[Warning] Received non-midi "
|
std::cerr << "[Warning] Received non-MIDI "
|
||||||
"event on midi processing thread"
|
"event on MIDI processing thread"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
return dispatch_wrapper(plugin, opcode, index, value, data,
|
return dispatch_wrapper(plugin, opcode, index, value, data,
|
||||||
@@ -247,7 +247,7 @@ void PluginBridge::handle_dispatch() {
|
|||||||
outputs.push_back(buffer.data());
|
outputs.push_back(buffer.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let the plugin process the midi events that were received since the
|
// Let the plugin process the MIDI events that were received since the
|
||||||
// last buffer, and then clean up those events. This approach should not
|
// last buffer, and then clean up those events. This approach should not
|
||||||
// be needed but Kontakt only stores pointers to rather than copies of
|
// be needed but Kontakt only stores pointers to rather than copies of
|
||||||
// the events.
|
// the events.
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class PluginBridge {
|
|||||||
* Used specifically for the `effProcessEvents` opcode. This is needed
|
* Used specifically for the `effProcessEvents` opcode. This is needed
|
||||||
* because the Win32 API is designed to block during certain GUI
|
* because the Win32 API is designed to block during certain GUI
|
||||||
* interactions such as resizing a window or opening a dropdown. Without
|
* interactions such as resizing a window or opening a dropdown. Without
|
||||||
* this midi input would just stop working at times.
|
* this MIDI input would just stop working at times.
|
||||||
*/
|
*/
|
||||||
boost::asio::local::stream_protocol::socket host_vst_dispatch_midi_events;
|
boost::asio::local::stream_protocol::socket host_vst_dispatch_midi_events;
|
||||||
boost::asio::local::stream_protocol::socket vst_host_callback;
|
boost::asio::local::stream_protocol::socket vst_host_callback;
|
||||||
@@ -142,7 +142,7 @@ class PluginBridge {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread that specifically handles `effProcessEvents` opcodes so the
|
* The thread that specifically handles `effProcessEvents` opcodes so the
|
||||||
* plugin can still receive midi during GUI interaction to work around Win32
|
* plugin can still receive MIDI during GUI interaction to work around Win32
|
||||||
* API limitations.
|
* API limitations.
|
||||||
*/
|
*/
|
||||||
Win32Thread dispatch_midi_events_handler;
|
Win32Thread dispatch_midi_events_handler;
|
||||||
|
|||||||
Reference in New Issue
Block a user