comparison transform/PluginTransform.h @ 27:61259228d029

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