Mercurial > hg > vamp-test-plugin
comparison plugins.cpp @ 34:bc4841b14d0f
Copyright note, untabify
author | Chris Cannam |
---|---|
date | Wed, 14 Sep 2016 17:56:19 +0100 |
parents | cfff2b6ff0fd |
children |
comparison
equal
deleted
inserted
replaced
33:60d48ba79ca1 | 34:bc4841b14d0f |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 /* | |
3 Vamp Test Plugin | |
4 Copyright (c) 2013-2016 Queen Mary, University of London | |
1 | 5 |
6 Permission is hereby granted, free of charge, to any person | |
7 obtaining a copy of this software and associated documentation | |
8 files (the "Software"), to deal in the Software without | |
9 restriction, including without limitation the rights to use, copy, | |
10 modify, merge, publish, distribute, sublicense, and/or sell copies | |
11 of the Software, and to permit persons to whom the Software is | |
12 furnished to do so, subject to the following conditions: | |
13 | |
14 The above copyright notice and this permission notice shall be | |
15 included in all copies or substantial portions of the Software. | |
16 | |
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
18 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
19 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
20 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | |
21 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | |
22 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
24 | |
25 Except as contained in this notice, the names of the Centre for | |
26 Digital Music and Queen Mary, University of London shall not be | |
27 used in advertising or otherwise to promote the sale, use or other | |
28 dealings in this Software without prior written authorization. | |
29 */ | |
2 | 30 |
3 #include <vamp/vamp.h> | 31 #include <vamp/vamp.h> |
4 #include <vamp-sdk/PluginAdapter.h> | 32 #include <vamp-sdk/PluginAdapter.h> |
5 | 33 |
6 #include "VampTestPlugin.h" | 34 #include "VampTestPlugin.h" |
7 | 35 |
8 class Adapter : public Vamp::PluginAdapterBase | 36 class Adapter : public Vamp::PluginAdapterBase |
9 { | 37 { |
10 public: | 38 public: |
11 Adapter(bool freq) : | 39 Adapter(bool freq) : |
12 PluginAdapterBase(), | 40 PluginAdapterBase(), |
13 m_freq(freq) { } | 41 m_freq(freq) { } |
14 | 42 |
15 virtual ~Adapter() { } | 43 virtual ~Adapter() { } |
16 | 44 |
17 protected: | 45 protected: |
18 bool m_freq; | 46 bool m_freq; |
19 | 47 |
20 Vamp::Plugin *createPlugin(float inputSampleRate) { | 48 Vamp::Plugin *createPlugin(float inputSampleRate) { |
21 return new VampTestPlugin(inputSampleRate, m_freq); | 49 return new VampTestPlugin(inputSampleRate, m_freq); |
22 } | 50 } |
23 }; | 51 }; |
24 | 52 |
25 static Adapter timeAdapter(false); | 53 static Adapter timeAdapter(false); |
26 static Adapter freqAdapter(true); | 54 static Adapter freqAdapter(true); |