rt-vamp-plugin-sdk 0.3.1
Real-time Vamp plugin SDK for C++20
Loading...
Searching...
No Matches
PluginLibrary.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4#include <memory>
5#include <string>
6#include <vector>
7
10
11// forward declarations
12struct _VampPluginDescriptor; // NOLINT
13typedef _VampPluginDescriptor VampPluginDescriptor; // NOLINT
14
15namespace rtvamp::hostsdk {
16
17class DynamicLibrary;
18
20public:
21 explicit PluginLibrary(const std::filesystem::path& libraryPath);
22
23 std::filesystem::path getLibraryPath() const noexcept;
24 std::string getLibraryName() const;
25
26 size_t getPluginCount() const noexcept;
27
28 std::vector<PluginKey> listPlugins() const;
29
30 std::unique_ptr<Plugin> loadPlugin(const PluginKey& key, float inputSampleRate) const;
31 std::unique_ptr<Plugin> loadPlugin(size_t index, float inputSampleRate) const;
32
33private:
34 std::shared_ptr<DynamicLibrary> dl_;
35 std::vector<const VampPluginDescriptor*> descriptors_;
36};
37
38} // namespace rtvamp::hostsdk
_VampPluginDescriptor VampPluginDescriptor
Definition PluginHostAdapter.hpp:14
_VampPluginDescriptor VampPluginDescriptor
Definition PluginLibrary.hpp:13
Identifier for a plugin uniquely within the scope of the current system.
Definition PluginKey.hpp:17
Definition PluginLibrary.hpp:19
PluginLibrary(const std::filesystem::path &libraryPath)
std::filesystem::path getLibraryPath() const noexcept
std::vector< PluginKey > listPlugins() const
size_t getPluginCount() const noexcept
std::unique_ptr< Plugin > loadPlugin(const PluginKey &key, float inputSampleRate) const
std::string getLibraryName() const
Definition Plugin.hpp:14
Definition hostsdk.hpp:12