mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-20 11:02:52 +02:00
Allow plugins to clean up after themselves
This commit is contained in:
@@ -198,6 +198,8 @@ intptr_t HostBridge::dispatch(AEffect* /*plugin*/,
|
|||||||
intptr_t value,
|
intptr_t value,
|
||||||
void* data,
|
void* data,
|
||||||
float option) {
|
float option) {
|
||||||
|
DispatchDataConverter converter(chunk_data);
|
||||||
|
|
||||||
// Some events need some extra handling
|
// Some events need some extra handling
|
||||||
// TODO: Handle other things such as GUI itneraction
|
// TODO: Handle other things such as GUI itneraction
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
@@ -205,6 +207,14 @@ intptr_t HostBridge::dispatch(AEffect* /*plugin*/,
|
|||||||
// TODO: Gracefully close the editor?
|
// TODO: Gracefully close the editor?
|
||||||
// TODO: Check whether the sockets and the endpoint are closed
|
// TODO: Check whether the sockets and the endpoint are closed
|
||||||
// correctly
|
// correctly
|
||||||
|
|
||||||
|
// Allow the plugin to handle its own shutdown
|
||||||
|
// TODO: Seems to cause segfaults in the Wine process, but doesn't
|
||||||
|
// seem to
|
||||||
|
// cause noticable problems
|
||||||
|
send_event(host_vst_dispatch, converter, opcode, index, value, data,
|
||||||
|
option, std::pair<Logger&, bool>(logger, true));
|
||||||
|
|
||||||
// XXX: Boost.Process will send SIGKILL to the process for us, is
|
// XXX: Boost.Process will send SIGKILL to the process for us, is
|
||||||
// there a way to manually send a SIGTERM signal instead?
|
// there a way to manually send a SIGTERM signal instead?
|
||||||
|
|
||||||
@@ -218,7 +228,6 @@ intptr_t HostBridge::dispatch(AEffect* /*plugin*/,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Maybe reuse buffers here when dealing with chunk data
|
// TODO: Maybe reuse buffers here when dealing with chunk data
|
||||||
DispatchDataConverter converter(chunk_data);
|
|
||||||
return send_event(host_vst_dispatch, converter, opcode, index, value, data,
|
return send_event(host_vst_dispatch, converter, opcode, index, value, data,
|
||||||
option, std::pair<Logger&, bool>(logger, true));
|
option, std::pair<Logger&, bool>(logger, true));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user