summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord/gt.h
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/powerchord/gt.h') (more/less context) (show 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
+
+
+
+
+