comparison vamp-hostsdk/PluginChannelAdapter.h @ 538:8ffb8985ae8f

Add ability to disown a wrapped plugin - making it possible to use the adapters in some situations involving managed pointers that didn't work previously
author Chris Cannam
date Thu, 23 Apr 2020 11:39:34 +0100
parents c97e70ed5abc
children
comparison
equal deleted inserted replaced
537:b9422f3e63a4 538:8ffb8985ae8f
102 * to make a potentially meaningless channel conversion for them.) 102 * to make a potentially meaningless channel conversion for them.)
103 * 103 *
104 * In every respect other than its management of channels, the 104 * In every respect other than its management of channels, the
105 * PluginChannelAdapter behaves identically to the plugin that it 105 * PluginChannelAdapter behaves identically to the plugin that it
106 * wraps. The wrapped plugin will be deleted when the wrapper is 106 * wraps. The wrapped plugin will be deleted when the wrapper is
107 * deleted. 107 * deleted. If you wish to prevent this, call disownPlugin().
108 * 108 *
109 * \note This class was introduced in version 1.1 of the Vamp plugin SDK. 109 * \note This class was introduced in version 1.1 of the Vamp plugin SDK.
110 */ 110 */
111 111
112 class PluginChannelAdapter : public PluginWrapper 112 class PluginChannelAdapter : public PluginWrapper
113 { 113 {
114 public: 114 public:
115 /** 115 /**
116 * Construct a PluginChannelAdapter wrapping the given plugin. 116 * Construct a PluginChannelAdapter wrapping the given plugin.
117 * The adapter takes ownership of the plugin, which will be 117 * The adapter takes ownership of the plugin, which will be
118 * deleted when the adapter is deleted. 118 * deleted when the adapter is deleted. If you wish to prevent
119 * this, call disownPlugin().
119 */ 120 */
120 PluginChannelAdapter(Plugin *plugin); 121 PluginChannelAdapter(Plugin *plugin);
121 virtual ~PluginChannelAdapter(); 122 virtual ~PluginChannelAdapter();
122 123
123 bool initialise(size_t channels, size_t stepSize, size_t blockSize); 124 bool initialise(size_t channels, size_t stepSize, size_t blockSize);