-
Notifications
You must be signed in to change notification settings - Fork 0
/
EffectPump.h
84 lines (64 loc) · 1.88 KB
/
EffectPump.h
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
/*
* File: EffectPump.h
* Author: astral
*
* Created on 25 Декабрь 2012 г., 19:44
*/
#ifndef EFFECTPUMP_H
#define EFFECTPUMP_H
#include <QtGui/QtGui>
#include <QtGui/QFrame>
#include <QtGui/QComboBox>
#include "QVector"
#include "Effect.h"
#include "EffectDistortion.h"
#include "EffectEcho.h"
#include "AudioIO.h"
#include "Mixer.h"
#define AMPLIFY (2) // 2x is to amplify quiet electric guitar sound
typedef enum EffectTypesE {
NONE = 0,
DISTORTION,
ECHO
}EffectTypes;
class EffectPump : public QWidget {
Q_OBJECT
public:
EffectPump(QWidget *parent = 0, AudioIO *audio = 0, Mixer *mixer = 0);
EffectPump(const EffectPump& orig);
virtual ~EffectPump();
void SetAudio(AudioIO *audio) { this->audio = audio; }
void SetMixer(Mixer *mixer) { this->mixer = mixer; }
public slots:
void FetchSound(); // AidioIO InputReady() signal reaction
void LoadEffect1(int i);
void LoadEffect2(int i);
void LoadEffect3(int i);
void UnloadEffect1();
void UnloadEffect2();
void UnloadEffect3();
void UnloadAllEffects();
private:
AudioIO* audio;
Mixer *mixer;
QVector<float> data;
bool processing;
Effect *e1;
Effect *e2;
Effect *e3;
void EnumerateEffects(QComboBox *list, int order);
Effect * SelectionParser(int i, QWidget *parent, QGridLayout *layout);
QFrame *effects_frame1;
QFrame *effects_frame2;
QFrame *effects_frame3;
QWidget *effects_layout_widget1;
QWidget *effects_layout_widget2;
QWidget *effects_layout_widget3;
QGridLayout *effects_layout1;
QGridLayout *effects_layout2;
QGridLayout *effects_layout3;
QComboBox *effects_list1;
QComboBox *effects_list2;
QComboBox *effects_list3;
};
#endif /* EFFECTPUMP_H */