forked from psemiletov/eko
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathafx.h
More file actions
84 lines (53 loc) · 1.41 KB
/
afx.h
File metadata and controls
84 lines (53 loc) · 1.41 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef AFX_H
#define AFX_H
#include <cstring>
#include <QObject>
#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QString>
#include <QXmlStreamWriter>
#include <QXmlStreamReader>
#include "floatbuffer.h"
#include "fxpresets.h"
enum FxState {
FXS_STOP,
FXS_RUN,
FXS_PAUSE
};
class AFx: public QObject
{
Q_OBJECT
public:
FxState state;
bool bypass;
bool realtime;
bool ui_visible;
CFloatBuffer *float_buffer; //inner buffer for some purposes
size_t channels;
size_t samplerate;
CFxPresets *presets;
QWidget *wnd_ui;
QVBoxLayout *vbl_main;
QWidget *w_caption;
QLabel *l_caption;
QLabel *l_subcaption;
QString classname;
QString modulename;
AFx();
~AFx();
virtual size_t execute (float **input, float **output, size_t frames) = 0;
//virtual void state_save_xml (QXmlStreamWriter *writer) = 0;
virtual QString save_params_to_string() = 0;
virtual void load_params_from_string (const QString &s) = 0;
virtual void set_state (FxState s);
virtual void reset_params (size_t srate, size_t ch);
void set_caption (const QString &capt, const QString &subcapt);
void show_ui();
virtual AFx* self_create() = 0;
static QString get_modulename() {return QString ("AFx");};
public slots:
void slot_preset_changed (const QString &text);
void slot_save_request();
};
#endif