00001 00002 #ifndef __GT_H 00003 #define __GT_H 00004 00005 #include <qobject.h> 00006 // sound includes 00007 #include <sys/soundcard.h> 00008 00009 #define BUFSIZE 256 00010 #define NUMCHANS 7 00011 00012 class gt : public QObject { 00013 00014 Q_OBJECT 00015 00016 public: 00017 gt(); 00018 ~gt(); 00019 00020 private: 00021 00022 int audio_fd; 00023 signed short audio_buf[BUFSIZE]; 00024 00025 int note; 00026 int tune; 00027 00028 short min; 00029 short max; 00030 int phase; 00031 00032 protected: 00033 00034 public: 00035 00036 // accessors 00037 int Tuning(){return tune;}; 00038 int Note(){return note;}; 00039 int Listening(){return (audio_fd == -1);}; 00040 00041 public slots : 00042 // methods 00043 void Listen(); 00044 void process_buffer(); 00045 void read_buffer(); 00046 void Stop(); 00047 }; 00048 00049 #endif 00050 00051 00052 00053 00054
1.4.2