-
Notifications
You must be signed in to change notification settings - Fork 0
/
playthread.h
42 lines (35 loc) · 924 Bytes
/
playthread.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
#ifndef PLAYTHREAD_H
#define PLAYTHREAD_H
#include <QThread>
#include "mainwindow.h"
#include "ymf262io.h"
#include "midifilereader.h"
#include "synththread.h"
class MainWindow;
class MIDIFileReader;
class SynthThread;
class PlayThread : public QThread
{
public:
PlayThread(QObject *parent, SynthThread *synthThread);
~PlayThread();
void note_on(int chn, int n, int v);
void note_off(int chn, int n, int v);
void control_change(int chn, int c, int v);
void program_change(int chn, int c);
void stop();
void start();
void setMIDIFile(QString midi_file);
// QThread interface
protected:
void run();
private:
MainWindow *mainWnd;
SynthThread *synthThread;
YMF262IO *ymf262;
MIDIFileReader *midiReader;
QString strMIDIFile;
void readSong();
void process_line(QString delta, QString type, QString ch, QString c, QString v);
};
#endif // PLAYTHREAD_H