mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 13:00:02 +02:00
Add a partial YaHostApplication implementation
This commit is contained in:
@@ -94,7 +94,7 @@ class YaHostApplication : public Steinberg::Vst::IHostApplication {
|
||||
* and we also track a `YaHostApplicationHostImpl` for the component with
|
||||
* instance id `x`, then that should also be dropped.
|
||||
*/
|
||||
~YaHostApplication();
|
||||
virtual ~YaHostApplication();
|
||||
|
||||
DECLARE_FUNKNOWN_METHODS
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// yabridge: a Wine VST bridge
|
||||
// Copyright (C) 2020 Robbert van der Helm
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "host-application.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
YaHostApplicationHostImpl::YaHostApplicationHostImpl(
|
||||
Vst3Bridge& bridge,
|
||||
YaHostApplication::ConstructArgs&& args)
|
||||
: YaHostApplication(std::move(args)), bridge(bridge) {
|
||||
// The lifecycle is thos object is managed together with that of the
|
||||
// `IComponent` instance this belongs to
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
YaHostApplicationHostImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
void** obj) {
|
||||
const tresult result = YaHostApplication::queryInterface(_iid, obj);
|
||||
if (result != Steinberg::kResultOk) {
|
||||
std::cerr << "TODO: Implement unknown interface logging on Wine side"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
YaHostApplicationHostImpl::createInstance(Steinberg::TUID cid,
|
||||
Steinberg::TUID _iid,
|
||||
void** obj) {
|
||||
// TODO: Implement
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// yabridge: a Wine VST bridge
|
||||
// Copyright (C) 2020 Robbert van der Helm
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <pluginterfaces/vst/ivsthostapplication.h>
|
||||
|
||||
#include "../vst3.h"
|
||||
|
||||
class YaHostApplicationHostImpl : public YaHostApplication {
|
||||
public:
|
||||
YaHostApplicationHostImpl(Vst3Bridge& bridge,
|
||||
YaHostApplication::ConstructArgs&& args);
|
||||
|
||||
/**
|
||||
* We'll override the query interface to log queries for interfaces we do
|
||||
* not (yet) support.
|
||||
*/
|
||||
tresult PLUGIN_API queryInterface(const Steinberg::TUID _iid,
|
||||
void** obj) override;
|
||||
|
||||
tresult PLUGIN_API createInstance(Steinberg::TUID cid,
|
||||
Steinberg::TUID _iid,
|
||||
void** obj) override;
|
||||
|
||||
private:
|
||||
Vst3Bridge& bridge;
|
||||
};
|
||||
Reference in New Issue
Block a user