-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfmodcontroller.h
62 lines (51 loc) · 1.34 KB
/
fmodcontroller.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
#ifndef FMODCONTROLLER_H
#define FMODCONTROLLER_H
#include <QWidget>
#include <iostream>
#include <QString>
#include <fmod/fmod.hpp>
#include <fmod/fmod_errors.h>
#include <QTimer>
class FMODController : public QWidget
{
Q_OBJECT
public:
enum CONTROLLER1_STATES{
NONE1 = 200, SOUND1, SOUND2, SOUND3, SOUND4, SOUND5, SOUND6
};
enum CONTROLLER2_STATES{
NONE2 = 300, STOP, DECREASE, INCREASE, START
};
enum SOUND_STATUS{
NONE3 = 400, PLAYING, STOPPED
};
struct{
int controller1;
int controller2;
}controllerState;
static const int FREQUENCY_STEP = 5;
explicit FMODController(QWidget *parent = 0);
struct SoundController{
FMOD::Sound *sound;
QTimer *timer;
int timeperiod;
int status;
};
FMOD::System *system;
SoundController sound1, sound2, sound3, sound4;
FMOD::Channel *channel;
void loadAudioFiles();
void ERRCHECK(FMOD_RESULT result);
signals:
void errorSignal(QString errorMessage);
void debugSignal(QString debugMessage);
public slots:
void debugSlot(QString message);
void errorSlot(QString message);
void controller(int controller1, int controller2);
void sound1Timeout();
void sound2Timeout();
void sound3Timeout();
void sound4Timeout();
};
#endif // FMODCONTROLLER_H