Loading...
Searching...
No Matches
Loader.hpp
1#pragma once
2// Taken and refactored from ofxVstHostPluginLoader.h
3// https://github.com/Meach/ofxVstHost
4
5#include <Vst/vst-compat.hpp>
6
7#include <QString>
8
9#include <string>
10
11namespace vst
12{
13using PluginEntryProc = AEffect* (*)(audioMasterCallback audioMaster);
14
15struct Module
16{
17 std::string path;
18 void* module{};
19
20 Module(std::string fileName);
21 ~Module();
22 PluginEntryProc getMain();
23
24 int use_count{};
25};
26
27#if defined(__APPLE__)
28static const constexpr auto default_path = "/Library/Audio/Plug-Ins/VST";
29static const constexpr auto default_filter = "*.vst *.dylib *.component";
30#elif defined(__linux__)
31static const auto default_path = QStringLiteral("/usr/lib/vst");
32static const constexpr auto default_filter = "*.so";
33#elif defined(_WIN32)
34static const constexpr auto default_path = "c:\\vst";
35static const constexpr auto default_filter = "*.dll";
36#else
37static const constexpr auto default_path = "";
38static const constexpr auto default_filter = "";
39#endif
40}
Definition Loader.hpp:16