mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +02:00
Implement IComponentHandler::restartComponent()
The base IComponentHandler is now fully implemented.
This commit is contained in:
@@ -471,6 +471,16 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaComponentHandler::RestartComponent& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": IComponentHandler::restartComponent(flags = "
|
||||
<< request.flags << ")";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Ack&) {
|
||||
log_response_base(is_host_vst, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::BeginEdit&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::PerformEdit&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::EndEdit&);
|
||||
bool log_request(bool is_host_vst,
|
||||
const YaComponentHandler::RestartComponent&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(
|
||||
|
||||
@@ -108,7 +108,8 @@ void serialize(S& s, ControlRequest& payload) {
|
||||
using CallbackRequest = std::variant<WantsConfiguration,
|
||||
YaComponentHandler::BeginEdit,
|
||||
YaComponentHandler::PerformEdit,
|
||||
YaComponentHandler::EndEdit>;
|
||||
YaComponentHandler::EndEdit,
|
||||
YaComponentHandler::RestartComponent>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, CallbackRequest& payload) {
|
||||
|
||||
@@ -125,6 +125,26 @@ class YaComponentHandler : public Steinberg::Vst::IComponentHandler {
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API endEdit(Steinberg::Vst::ParamID id) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to
|
||||
* `IComponentHandler::restartComponent(flags)` to the component handler
|
||||
* provided by the host.
|
||||
*/
|
||||
struct RestartComponent {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
int32 flags;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.value4b(flags);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API restartComponent(int32 flags) override = 0;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user