summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord/gt.h
Unidiff
Diffstat (limited to 'noncore/multimedia/powerchord/gt.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/powerchord/gt.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/noncore/multimedia/powerchord/gt.h b/noncore/multimedia/powerchord/gt.h
new file mode 100644
index 0000000..53c9f08
--- a/dev/null
+++ b/noncore/multimedia/powerchord/gt.h
@@ -0,0 +1,54 @@
1
2#ifndef __GT_H
3#define __GT_H
4
5#include <qobject.h>
6// sound includes
7#include <sys/soundcard.h>
8
9#define BUFSIZE 256
10#define NUMCHANS 7
11
12class gt : public QObject {
13
14 Q_OBJECT
15
16 public:
17 gt();
18 ~gt();
19
20 private:
21
22 int audio_fd;
23 signed short audio_buf[BUFSIZE];
24
25 int note;
26 int tune;
27
28 short min;
29 short max;
30 int phase;
31
32 protected:
33
34 public:
35
36 // accessors
37 int Tuning(){return tune;};
38 int Note(){return note;};
39 int Listening(){return (audio_fd == -1);};
40
41 public slots :
42 // methods
43 void Listen();
44 void process_buffer();
45 void read_buffer();
46 void Stop();
47};
48
49#endif
50
51
52
53
54