mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +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
|
||||
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
|
||||
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.
|
||||
- Host callback calls from the Windows VST plugin loaded into the Wine VST
|
||||
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;
|
||||
/**
|
||||
* 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);
|
||||
/**
|
||||
@@ -160,7 +160,7 @@ class alignas(16) DynamicVstEvents {
|
||||
VstEvents& as_c_events();
|
||||
|
||||
/**
|
||||
* Midi events are sent in batches.
|
||||
* MIDI events are sent in batches.
|
||||
*/
|
||||
std::vector<VstEvent> events;
|
||||
|
||||
@@ -174,7 +174,7 @@ class alignas(16) DynamicVstEvents {
|
||||
* `vestige/aeffectx.h` the struct contains a single element `VstEvent`
|
||||
* pointer array, but the actual length of this array is
|
||||
* `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.
|
||||
*/
|
||||
std::vector<uint8_t> vst_events_buffer;
|
||||
@@ -221,7 +221,7 @@ struct WantsString {};
|
||||
* - An X11 window handle.
|
||||
* - Specific data structures from `aeffextx.h`. For instance an event with the
|
||||
* 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.
|
||||
*
|
||||
* - 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;
|
||||
case effProcessEvents:
|
||||
// Because of limitations of the Win32 API we have to use a seperate
|
||||
// thread and socket to pass midi events. Otherwise plugins will
|
||||
// stop receiving midi data when they have an open dropdowns or
|
||||
// thread and socket to pass MIDI events. Otherwise plugins will
|
||||
// stop receiving MIDI data when they have an open dropdowns or
|
||||
// message box.
|
||||
return send_event(host_vst_dispatch_midi_events,
|
||||
dispatch_midi_events_mutex, converter,
|
||||
|
||||
@@ -145,7 +145,7 @@ class HostBridge {
|
||||
* Used specifically for the `effProcessEvents` opcode. This is needed
|
||||
* because the Win32 API is designed to block during certain GUI
|
||||
* 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 vst_host_callback;
|
||||
|
||||
@@ -128,7 +128,7 @@ PluginBridge::PluginBridge(std::string plugin_dll_path,
|
||||
write_object(vst_host_aeffect, *plugin);
|
||||
|
||||
// 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.
|
||||
dispatch_midi_events_handler =
|
||||
Win32Thread(handle_dispatch_midi_events_proxy, this);
|
||||
@@ -188,8 +188,8 @@ void PluginBridge::handle_dispatch() {
|
||||
return plugin->dispatcher(plugin, opcode, index, value,
|
||||
&events->as_c_events(), option);
|
||||
} else {
|
||||
std::cerr << "[Warning] Received non-midi "
|
||||
"event on midi processing thread"
|
||||
std::cerr << "[Warning] Received non-MIDI "
|
||||
"event on MIDI processing thread"
|
||||
<< std::endl;
|
||||
|
||||
return dispatch_wrapper(plugin, opcode, index, value, data,
|
||||
@@ -247,7 +247,7 @@ void PluginBridge::handle_dispatch() {
|
||||
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
|
||||
// be needed but Kontakt only stores pointers to rather than copies of
|
||||
// the events.
|
||||
|
||||
@@ -122,7 +122,7 @@ class PluginBridge {
|
||||
* Used specifically for the `effProcessEvents` opcode. This is needed
|
||||
* because the Win32 API is designed to block during certain GUI
|
||||
* 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 vst_host_callback;
|
||||
@@ -142,7 +142,7 @@ class PluginBridge {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
Win32Thread dispatch_midi_events_handler;
|
||||
|
||||
Reference in New Issue
Block a user