annotate transform/PluginTransform.h @ 61:963e3187d920

* Fix slowness in serving FFT values to feature extraction plugin transform (failure to call resume() on FFT model) * Fix failure to update completion from time/value model
author Chris Cannam
date Tue, 17 Oct 2006 13:49:31 +0000
parents 61259228d029
children bedc7517b6e8
rev   line source
Chris@27 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@27 2
Chris@27 3 /*
Chris@27 4 Sonic Visualiser
Chris@27 5 An audio file viewer and annotation editor.
Chris@27 6 Centre for Digital Music, Queen Mary, University of London.
Chris@27 7 This file copyright 2006 Chris Cannam.
Chris@27 8
Chris@27 9 This program is free software; you can redistribute it and/or
Chris@27 10 modify it under the terms of the GNU General Public License as
Chris@27 11 published by the Free Software Foundation; either version 2 of the
Chris@27 12 License, or (at your option) any later version. See the file
Chris@27 13 COPYING included with this distribution for more information.
Chris@27 14 */
Chris@27 15
Chris@27 16 #ifndef _PLUGIN_TRANSFORM_H_
Chris@27 17 #define _PLUGIN_TRANSFORM_H_
Chris@27 18
Chris@27 19 #include "Transform.h"
Chris@27 20
Chris@27 21 #include "base/Window.h"
Chris@27 22
Chris@27 23 #include "vamp-sdk/Plugin.h"
Chris@27 24
Chris@27 25 //!!! should this just move back up to Transform? It is after all used
Chris@27 26 //directly in all sorts of generic places, like Document
Chris@27 27
Chris@27 28 class PluginTransform : public Transform
Chris@27 29 {
Chris@27 30 public:
Chris@27 31 class ExecutionContext {
Chris@27 32 public:
Chris@27 33 // Time domain:
Chris@27 34 ExecutionContext(int _c = -1, size_t _bs = 0);
Chris@27 35
Chris@27 36 // Frequency domain:
Chris@27 37 ExecutionContext(int _c, size_t _ss, size_t _bs, WindowType _wt);
Chris@27 38
Chris@27 39 // From plugin defaults:
Chris@27 40 ExecutionContext(int _c, const Vamp::PluginBase *_plugin);
Chris@27 41
Chris@27 42 bool operator==(const ExecutionContext &);
Chris@27 43
Chris@27 44 void makeConsistentWithPlugin(const Vamp::PluginBase *_plugin);
Chris@27 45
Chris@27 46 int channel;
Chris@27 47 Vamp::Plugin::InputDomain domain;
Chris@27 48 size_t stepSize;
Chris@27 49 size_t blockSize;
Chris@27 50 WindowType windowType;
Chris@27 51 };
Chris@27 52
Chris@27 53 protected:
Chris@27 54 PluginTransform(Model *inputModel,
Chris@27 55 const ExecutionContext &context);
Chris@27 56
Chris@27 57 ExecutionContext m_context;
Chris@27 58 };
Chris@27 59
Chris@27 60 #endif