-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathequalizerwindow.h
84 lines (60 loc) · 1.58 KB
/
equalizerwindow.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
#ifndef EQUALIZERWINDOW_H
#define EQUALIZERWINDOW_H
#include <QWidget>
#include <QSlider>
#include <QDebug>
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QFrame>
#include <QPushButton>
#include <time.h>
#include <string>
#include "bass.h"
#include "bass_fx.h"
#include "customslider.h"
const int FREQS_COUNT = 16;
namespace Ui {
class equalizerWindow;
}
class equalizerWindow : public QWidget
{
Q_OBJECT
public:
HSTREAM * channel = nullptr;
QColor * mainColor;
std::string * mainColorStr;
QCheckBox * enabledCheckBox;
explicit equalizerWindow(QWidget * parent = nullptr);
~equalizerWindow();
void init();
void reloadStyles ();
private:
float sampleRate;
bool reversed = false;
Ui::equalizerWindow * ui;
QComboBox * templates;
CustomSlider * pitch;
CustomSlider * tempo;
CustomSlider * speed;
CustomSlider * reverb;
QLabel * pitchValue;
QLabel * tempoValue;
QLabel * reverbValue;
QLabel * speedValue;
QLabel * reverbTitle;
void reverbUpdate(int v) {
int value = v;
v = 20 - v;
BASS_DX8_REVERB p;
BASS_FXGetParameters(reverbFx, &p);
p.fReverbMix = -0.012f * (float)(v * v * v);
BASS_FXSetParameters(reverbFx, &p);
reverbValue->setText(QString::number(int((value - 5) / 1.5f)));
}
CustomSlider * freqs[FREQS_COUNT];
int freq_values[FREQS_COUNT] = {31, 63, 87, 125, 175, 250, 350, 500, 700, 1000, 2000, 2800, 4000, 5600, 8000, 11200};
HFX fx[FREQS_COUNT];
HFX reverbFx;
};
#endif // EQUALIZERWINDOW_H