annotate libmain.cpp @ 198:3a76aa26b578 tip master

wscript: check for 64bit using sys.maxsize (closes #3)
author Paul Brossier <piem@piem.org>
date Mon, 04 Dec 2017 01:42:19 +0100
parents f80b207ccd15
children
rev   line source
cannam@0 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@0 2
cannam@0 3 /*
cannam@0 4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
cannam@0 5
cannam@0 6 Centre for Digital Music, Queen Mary, University of London.
cannam@0 7 This file copyright 2006 Chris Cannam.
cannam@0 8
piem@112 9 This file is part of vamp-aubio-plugins.
piem@112 10
piem@112 11 vamp-aubio is free software: you can redistribute it and/or modify
piem@112 12 it under the terms of the GNU General Public License as published by
piem@112 13 the Free Software Foundation, either version 3 of the License, or
piem@112 14 (at your option) any later version.
piem@112 15
piem@112 16 vamp-aubio is distributed in the hope that it will be useful,
piem@112 17 but WITHOUT ANY WARRANTY; without even the implied warranty of
piem@112 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
piem@112 19 GNU General Public License for more details.
piem@112 20
piem@112 21 You should have received a copy of the GNU General Public License
piem@112 22 along with aubio. If not, see <http://www.gnu.org/licenses/>.
cannam@0 23
cannam@0 24 */
cannam@0 25
cannam@0 26 #include <vamp/vamp.h>
cannam@0 27 #include <vamp-sdk/PluginAdapter.h>
cannam@0 28
cannam@0 29 #include "plugins/Onset.h"
cannam@0 30 #include "plugins/Pitch.h"
cannam@0 31 #include "plugins/Notes.h"
cannam@7 32 #include "plugins/Tempo.h"
cannam@17 33 #include "plugins/Silence.h"
piem@73 34 #include "plugins/Mfcc.h"
piem@85 35 #include "plugins/MelEnergy.h"
piem@90 36 #include "plugins/SpecDesc.h"
cannam@0 37
cannam@0 38 static Vamp::PluginAdapter<Onset> onsetAdapter;
cannam@0 39 static Vamp::PluginAdapter<Pitch> pitchAdapter;
cannam@31 40 static Vamp::PluginAdapter<Notes> notesAdapter;
cannam@7 41 static Vamp::PluginAdapter<Tempo> tempoAdapter;
cannam@31 42 static Vamp::PluginAdapter<Silence> silenceAdapter;
piem@73 43 static Vamp::PluginAdapter<Mfcc> mfccAdapter;
piem@85 44 static Vamp::PluginAdapter<MelEnergy> melenergyAdapter;
piem@90 45 static Vamp::PluginAdapter<SpecDesc> specdescAdapter;
cannam@0 46
cannam@14 47 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
cannam@14 48 unsigned int index)
cannam@0 49 {
cannam@31 50 if (vampApiVersion < 2) return 0;
cannam@14 51
cannam@0 52 switch (index) {
cannam@0 53 case 0: return onsetAdapter.getDescriptor();
cannam@0 54 case 1: return pitchAdapter.getDescriptor();
cannam@31 55 case 2: return notesAdapter.getDescriptor();
cannam@7 56 case 3: return tempoAdapter.getDescriptor();
cannam@31 57 case 4: return silenceAdapter.getDescriptor();
piem@73 58 case 5: return mfccAdapter.getDescriptor();
piem@85 59 case 6: return melenergyAdapter.getDescriptor();
piem@90 60 case 7: return specdescAdapter.getDescriptor();
cannam@0 61 default: return 0;
cannam@0 62 }
cannam@0 63 }
cannam@0 64