blob: 53c9f081b50f8c62729d8522a6def8ef4cd32b41 (
plain)
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
|
#ifndef __GT_H
#define __GT_H
#include <qobject.h>
// sound includes
#include <sys/soundcard.h>
#define BUFSIZE 256
#define NUMCHANS 7
class gt : public QObject {
Q_OBJECT
public:
gt();
~gt();
private:
int audio_fd;
signed short audio_buf[BUFSIZE];
int note;
int tune;
short min;
short max;
int phase;
protected:
public:
// accessors
int Tuning(){return tune;};
int Note(){return note;};
int Listening(){return (audio_fd == -1);};
public slots :
// methods
void Listen();
void process_buffer();
void read_buffer();
void Stop();
};
#endif
|