summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord/gt.h
authormickeyl <mickeyl>2004-01-20 13:07:31 (UTC)
committer mickeyl <mickeyl>2004-01-20 13:07:31 (UTC)
commitd388324e7b91bdd95553c3849d77cddd5bd0bfc4 (patch) (side-by-side diff)
treeef660ffd25aa8cabbfa58e6c3b170e7c82511bc6 /noncore/multimedia/powerchord/gt.h
parent105007cca23072ee42a1f36625979966eb8a4854 (diff)
downloadopie-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) (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 @@
+
+#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
+
+
+
+
+