rt-vamp-plugin-sdk  0.3.1
Real-time Vamp plugin SDK for C++20
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
12 struct _VampPluginDescriptor;
13 typedef _VampPluginDescriptor VampPluginDescriptor;
14 
15 namespace rtvamp::hostsdk {
16 
17 class DynamicLibrary;
18 
20 public:
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 
33 private:
34  std::shared_ptr<DynamicLibrary> dl_;
35  std::vector<const VampPluginDescriptor*> descriptors_;
36 };
37 
38 } // namespace rtvamp::hostsdk
rtvamp::hostsdk::PluginLibrary::getLibraryPath
std::filesystem::path getLibraryPath() const noexcept
PluginKey.hpp
VampPluginDescriptor
_VampPluginDescriptor VampPluginDescriptor
Definition: PluginLibrary.hpp:12
Plugin.hpp
rtvamp::hostsdk::PluginLibrary::getPluginCount
size_t getPluginCount() const noexcept
rtvamp::hostsdk::PluginLibrary::PluginLibrary
PluginLibrary(const std::filesystem::path &libraryPath)
rtvamp::hostsdk::PluginLibrary::listPlugins
std::vector< PluginKey > listPlugins() const
rtvamp::hostsdk
Definition: Plugin.hpp:12
rtvamp::hostsdk::PluginLibrary
Definition: PluginLibrary.hpp:19
rtvamp::hostsdk::PluginLibrary::getLibraryName
std::string getLibraryName() const
rtvamp::hostsdk::PluginKey
Identifier for a plugin uniquely within the scope of the current system.
Definition: PluginKey.hpp:17
rtvamp::hostsdk::PluginLibrary::loadPlugin
std::unique_ptr< Plugin > loadPlugin(const PluginKey &key, float inputSampleRate) const