Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

gapeaudioinput.h

00001 // gapeaudiooutput.h
00002 // Dave Chisholm dkc@ccrma.stanford.edu 12/1/00
00003 #ifndef _GAPE_AUDIO_INPUT_H
00004 #define _GAPE_AUDIO_INPUT_H
00005 #include "gapeunit.h"
00006 #include "RtWvOut.h"
00007 #include "RtAudio.h"
00008 
00016 class GapeAudioInput : public GapeUnit {
00017 Q_OBJECT
00018         public:
00027             GapeAudioInput(GapeController* c = NULL, int numChannels = 1, int device = -1);
00028 
00029         virtual ~GapeAudioInput();
00030 
00031         public slots:
00040             virtual void receiveTick(const GapeFloat* values, int numValues);
00041             virtual void stop();
00042             virtual void start();
00043             virtual void setMute(bool b);
00049             virtual void setNumChannels(int nc) {
00050                 GapeConsts::reportError("Tried to change num channels in GapeAudioOutput!\n");
00051             }
00052 
00053         protected:
00054             void getMoreData();
00055 
00056             RtAudio* input;
00057             bool properlyInitialized;
00058             GapeIntSample* soundBuffer;
00059             int soundBufferSize, currentBufferPosition;
00060             bool properInitializationReportedFlag;
00061             int tickCounter;
00062             //we use the has been muted flag for threadsafe changing of our mute status
00063             bool hasBeenMuted;
00064 };
00065 #endif

Generated at Thu Jun 21 13:28:49 2001 for GAPE by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001