annotate plugin/FeatureExtractionPluginAdapter.cpp @ 58:0a34d529f8e0

* Add C API for feature extraction plugins * First cut of an adapter class to make C++ feature extraction plugins available using the C API. This will probably mutate quite a bit and likely move to its own SDK tree.
author Chris Cannam
date Fri, 24 Mar 2006 17:36:10 +0000
parents
children 3086ff194ea0
rev   line source
Chris@58 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@58 2
Chris@58 3 /*
Chris@58 4 Sonic Visualiser
Chris@58 5 An audio file viewer and annotation editor.
Chris@58 6 Centre for Digital Music, Queen Mary, University of London.
Chris@58 7 This file copyright 2006 Chris Cannam.
Chris@58 8
Chris@58 9 This program is free software; you can redistribute it and/or
Chris@58 10 modify it under the terms of the GNU General Public License as
Chris@58 11 published by the Free Software Foundation; either version 2 of the
Chris@58 12 License, or (at your option) any later version. See the file
Chris@58 13 COPYING included with this distribution for more information.
Chris@58 14 */
Chris@58 15
Chris@58 16 #include "FeatureExtractionPluginAdapter.h"
Chris@58 17
Chris@58 18 #include "plugins/ChromagramPlugin.h"
Chris@58 19
Chris@58 20 extern int blah()
Chris@58 21 {
Chris@58 22 FeatureExtractionPluginAdapter<ChromagramPlugin> adapter;
Chris@58 23
Chris@58 24 const SVPPluginDescriptor *desc = adapter.getDescriptor();
Chris@58 25
Chris@58 26 SVPPluginHandle handle = desc->instantiate(desc, 48000);
Chris@58 27
Chris@58 28 unsigned int preferredBlockSize = desc->getPreferredBlockSize(handle);
Chris@58 29
Chris@58 30 SVPOutputDescriptor *od = desc->getOutputDescriptor(handle, 2);
Chris@58 31
Chris@58 32 SVPFeatureList **feature = desc->process(handle, 0, 0, 0);
Chris@58 33 }
Chris@58 34