Chris@423: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@423: Chris@423: /* Chris@423: Vamp Chris@423: Chris@423: An API for audio analysis and feature extraction plugins. Chris@423: Chris@423: Centre for Digital Music, Queen Mary, University of London. Chris@423: Copyright 2006-2016 Chris Cannam and QMUL. Chris@423: Chris@423: Permission is hereby granted, free of charge, to any person Chris@423: obtaining a copy of this software and associated documentation Chris@423: files (the "Software"), to deal in the Software without Chris@423: restriction, including without limitation the rights to use, copy, Chris@423: modify, merge, publish, distribute, sublicense, and/or sell copies Chris@423: of the Software, and to permit persons to whom the Software is Chris@423: furnished to do so, subject to the following conditions: Chris@423: Chris@423: The above copyright notice and this permission notice shall be Chris@423: included in all copies or substantial portions of the Software. Chris@423: Chris@423: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@423: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@423: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND Chris@423: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR Chris@423: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@423: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@423: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@423: Chris@423: Except as contained in this notice, the names of the Centre for Chris@423: Digital Music; Queen Mary, University of London; and Chris Cannam Chris@423: shall not be used in advertising or otherwise to promote the sale, Chris@423: use or other dealings in this Software without prior written Chris@423: authorization. Chris@423: */ Chris@423: Chris@423: #ifndef VAMP_LOAD_REQUEST_H Chris@423: #define VAMP_LOAD_REQUEST_H Chris@423: Chris@423: #include "PluginStaticData.h" Chris@423: #include "PluginConfiguration.h" Chris@423: Chris@423: #include "hostguard.h" Chris@423: Chris@423: #include Chris@423: #include Chris@423: Chris@423: _VAMP_SDK_HOSTSPACE_BEGIN(LoadRequest.h) Chris@423: Chris@423: namespace Vamp { Chris@423: Chris@423: class Plugin; Chris@423: Chris@423: namespace HostExt { Chris@423: Chris@423: /** Chris@423: * \class LoadRequest LoadRequest.h Chris@423: * Chris@423: * Vamp::HostExt::LoadRequest is a structure containing the Chris@423: * information necessary to load a plugin. When a request is made to Chris@423: * load a plugin using a LoadRequest, the response is typically Chris@423: * returned in a LoadResponse structure. Chris@423: * Chris@423: * \see LoadResponse Chris@423: * Chris@423: * \note This class was introduced in version 2.7 of the Vamp plugin Chris@423: * SDK, along with the PluginLoader method that accepts this structure Chris@423: * rather than accepting its elements individually. Chris@423: */ Chris@423: struct LoadRequest Chris@423: { Chris@423: LoadRequest() : // invalid request by default Chris@423: inputSampleRate(0.f), Chris@423: adapterFlags(0) { } Chris@423: Chris@423: std::string pluginKey; //!!! separate out key from PluginLoader?? Chris@423: float inputSampleRate; Chris@423: int adapterFlags; //!!! from PluginLoader::AdapterFlags, but how best to handle? Chris@423: }; Chris@423: Chris@423: /** Chris@423: * \class LoadResponse LoadResponse.h Chris@423: * Chris@423: * Vamp::HostExt::LoadResponse is a structure containing the Chris@423: * information returned by PluginLoader when asked to load a plugin Chris@423: * using a LoadRequest. Chris@423: * Chris@423: * If the plugin could not be loaded, the plugin field will be 0. Chris@423: * Chris@423: * The caller takes ownership of the plugin contained here, which Chris@423: * should be deleted (using the standard C++ delete keyword) after Chris@423: * use. Chris@423: * Chris@423: * \see LoadRequest Chris@423: * Chris@423: * \note This class was introduced in version 2.7 of the Vamp plugin Chris@423: * SDK, along with the PluginLoader method that returns this structure. Chris@423: */ Chris@423: struct LoadResponse Chris@423: { Chris@423: LoadResponse() : // invalid (failed) response by default Chris@423: plugin(0) { } Chris@423: Chris@423: Plugin *plugin; Chris@423: PluginStaticData staticData; Chris@423: PluginConfiguration defaultConfiguration; Chris@423: }; Chris@423: Chris@423: } Chris@423: Chris@423: } Chris@423: Chris@423: _VAMP_SDK_HOSTSPACE_END(LoadRequest.h) Chris@423: Chris@423: #endif