Created
October 6, 2020 10:56
-
-
Save kyab/8719ab4fdb218c3f454b6a9a6138b26a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CEditorHost.hpp | |
// Late5 Studio | |
// | |
// Created by kyab on 2020/10/05. | |
// Copyright © 2020 kyab. All rights reserved. | |
// | |
#ifndef CEditorHost_hpp | |
#define CEditorHost_hpp | |
#import <Cocoa/Cocoa.h> | |
#import <Foundation/Foundation.h> | |
#include <stdio.h> | |
#include "pluginterfaces/base/funknown.h" | |
#include "pluginterfaces/gui/iplugview.h" | |
#include "pluginterfaces/gui/iplugviewcontentscalesupport.h" | |
#include "pluginterfaces/vst/ivstaudioprocessor.h" | |
#include "pluginterfaces/vst/ivsteditcontroller.h" | |
#include "pluginterfaces/vst/vsttypes.h" | |
#include "pluginterfaces/vst/ivsthostapplication.h" | |
#define _DEBUG | |
#include "public.sdk/source/vst/hosting/pluginterfacesupport.h" | |
#include <cstdio> | |
#include <iostream> | |
using namespace Steinberg; | |
class MyHostApplication : public Vst::IHostApplication | |
{ | |
public: | |
MyHostApplication (){ | |
} | |
~MyHostApplication () { | |
} | |
//--- IHostApplication --------------- | |
tresult PLUGIN_API getName (Vst::String128 name) SMTG_OVERRIDE{ | |
NSLog(@"MyHostApplication::getName called"); | |
return kResultOk; | |
}; | |
tresult PLUGIN_API createInstance (TUID cid, TUID _iid, void** obj) SMTG_OVERRIDE{ | |
NSLog(@"MyHostApplication::createInstance called"); | |
return kResultOk; | |
} | |
// DECLARE_FUNKNOWN_METHODS | |
Vst::PlugInterfaceSupport* getPlugInterfaceSupport () const { | |
NSLog(@"MyHostApplication::getPlugInterfaceSupport called"); | |
return mPlugInterfaceSupport; | |
} | |
public: | |
tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) override | |
{ | |
NSLog(@"MyHostApplication::queryInterface called for %s", _iid); | |
*obj = (Vst::IHostApplication *)this; | |
return kResultOk; | |
} | |
uint32 PLUGIN_API addRef () override { return 1000; } | |
uint32 PLUGIN_API release () override { return 1000; } | |
protected: | |
IPtr<Vst::PlugInterfaceSupport> mPlugInterfaceSupport; | |
}; | |
#endif /* CEditorHost_hpp */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment