annotate libmain.cpp @ 103:932099d4c440

INSTALL.osx: add build instructions for osx
author Paul Brossier <piem@piem.org>
date Sat, 31 Jan 2015 14:30:32 +0100
parents e28946bf0b05
children f80b207ccd15
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
cannam@0 9 This program is free software; you can redistribute it and/or
cannam@0 10 modify it under the terms of the GNU General Public License as
cannam@0 11 published by the Free Software Foundation; either version 2 of the
cannam@0 12 License, or (at your option) any later version. See the file
cannam@0 13 COPYING included with this distribution for more information.
cannam@0 14
cannam@0 15 */
cannam@0 16
cannam@0 17 #include <vamp/vamp.h>
cannam@0 18 #include <vamp-sdk/PluginAdapter.h>
cannam@0 19
cannam@0 20 #include "plugins/Onset.h"
cannam@0 21 #include "plugins/Pitch.h"
cannam@0 22 #include "plugins/Notes.h"
cannam@7 23 #include "plugins/Tempo.h"
cannam@17 24 #include "plugins/Silence.h"
piem@73 25 #include "plugins/Mfcc.h"
piem@85 26 #include "plugins/MelEnergy.h"
piem@90 27 #include "plugins/SpecDesc.h"
cannam@0 28
cannam@0 29 static Vamp::PluginAdapter<Onset> onsetAdapter;
cannam@0 30 static Vamp::PluginAdapter<Pitch> pitchAdapter;
cannam@31 31 static Vamp::PluginAdapter<Notes> notesAdapter;
cannam@7 32 static Vamp::PluginAdapter<Tempo> tempoAdapter;
cannam@31 33 static Vamp::PluginAdapter<Silence> silenceAdapter;
piem@73 34 static Vamp::PluginAdapter<Mfcc> mfccAdapter;
piem@85 35 static Vamp::PluginAdapter<MelEnergy> melenergyAdapter;
piem@90 36 static Vamp::PluginAdapter<SpecDesc> specdescAdapter;
cannam@0 37
cannam@14 38 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
cannam@14 39 unsigned int index)
cannam@0 40 {
cannam@31 41 if (vampApiVersion < 2) return 0;
cannam@14 42
cannam@0 43 switch (index) {
cannam@0 44 case 0: return onsetAdapter.getDescriptor();
cannam@0 45 case 1: return pitchAdapter.getDescriptor();
cannam@31 46 case 2: return notesAdapter.getDescriptor();
cannam@7 47 case 3: return tempoAdapter.getDescriptor();
cannam@31 48 case 4: return silenceAdapter.getDescriptor();
piem@73 49 case 5: return mfccAdapter.getDescriptor();
piem@85 50 case 6: return melenergyAdapter.getDescriptor();
piem@90 51 case 7: return specdescAdapter.getDescriptor();
cannam@0 52 default: return 0;
cannam@0 53 }
cannam@0 54 }
cannam@0 55