Use conf.fatal for fatal configuration errors
[ardour.git] / libs / vamp-pyin / libmain.cpp
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2
3 /*
4     pYIN - A fundamental frequency estimator for monophonic audio
5     Centre for Digital Music, Queen Mary, University of London.
6
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License as
9     published by the Free Software Foundation; either version 2 of the
10     License, or (at your option) any later version.  See the file
11     COPYING included with this distribution for more information.
12 */
13
14 #include <vamp/vamp.h>
15 #include <vamp-sdk/PluginAdapter.h>
16
17 #include "PYinVamp.h"
18 #include "YinVamp.h"
19 #include "LocalCandidatePYIN.h"
20
21 static Vamp::PluginAdapter<PYinVamp> pyinvampPluginAdapter;
22 static Vamp::PluginAdapter<YinVamp> yinvampPluginAdapter;
23 static Vamp::PluginAdapter<LocalCandidatePYIN> localCandidatePYINPluginAdapter;
24
25 const VampPluginDescriptor *
26 vampGetPluginDescriptor(unsigned int version, unsigned int index)
27 {
28     if (version < 1) return 0;
29
30     switch (index) {
31     case  0: return pyinvampPluginAdapter.getDescriptor();
32     case  1: return yinvampPluginAdapter.getDescriptor();
33     case  2: return localCandidatePYINPluginAdapter.getDescriptor();
34     default: return 0;
35     }
36 }
37
38