summaryrefslogtreecommitdiffstats
path: root/src/engine/engineobject.h
blob: a80bc496cc3836c83a32c9a8fb3a804286edfdad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/***************************************************************************
                          engineobject.h  -  description
                             -------------------
    begin                : Wed Feb 20 2002
    copyright            : (C) 2002 by Tue and Ken Haste Andersen
    email                :
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#pragma once

#include <QObject>

#include "util/types.h"
#include "engine/effects/groupfeaturestate.h"

class EngineObject : public QObject {
    Q_OBJECT
  public:
    EngineObject();
    virtual ~EngineObject();
    virtual void process(CSAMPLE* pInOut,
                         const int iBufferSize) = 0;

    // Sub-classes re-implement and populate GroupFeatureState with the features
    // they extract.
    virtual void collectFeatures(GroupFeatureState* pGroupFeatures) const {
        Q_UNUSED(pGroupFeatures);
    }
};

class EngineObjectConstIn : public QObject {
    Q_OBJECT
  public:
    EngineObjectConstIn();
    virtual ~EngineObjectConstIn();

    virtual void process(const CSAMPLE* pIn, CSAMPLE* pOut,
                         const int iBufferSize) = 0;
};