author | mickeyl <mickeyl> | 2004-01-20 13:07:31 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-20 13:07:31 (UTC) |
commit | d388324e7b91bdd95553c3849d77cddd5bd0bfc4 (patch) (unidiff) | |
tree | ef660ffd25aa8cabbfa58e6c3b170e7c82511bc6 /noncore/multimedia/powerchord/gt.h | |
parent | 105007cca23072ee42a1f36625979966eb8a4854 (diff) | |
download | opie-d388324e7b91bdd95553c3849d77cddd5bd0bfc4.zip opie-d388324e7b91bdd95553c3849d77cddd5bd0bfc4.tar.gz opie-d388324e7b91bdd95553c3849d77cddd5bd0bfc4.tar.bz2 |
initial import of powerchord courtesy Camilo Mesias <mailto:camilo@mesias.co.uk>
modified some bits to be compatible with the opie build system
packaging not complete yet
i hope camilo will maintain this here...
Diffstat (limited to 'noncore/multimedia/powerchord/gt.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/powerchord/gt.h | 54 |
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 | |||
12 | class 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 | |||