00001
00002
00003 #ifndef _GAPE_AUDIO_OUTPUT_H
00004 #define _GAPE_AUDIO_OUTPUT_H
00005 #include "gapeunit.h"
00006 #include "RtWvOut.h"
00007
00015 class GapeAudioOutput : public GapeUnit {
00016 Q_OBJECT
00017 public:
00026 GapeAudioOutput(GapeController* c = NULL, int numChannels = 1, int device = -1);
00027
00028 virtual ~GapeAudioOutput();
00029
00030 public slots:
00036 virtual void receiveTick(const GapeFloat* values, int numValues);
00037 virtual void stop();
00038 virtual void start();
00039 virtual void setMute(bool b);
00045 virtual void setNumChannels(int nc) {
00046 GapeConsts::reportError("Tried to change num channels in GapeAudioOutput!\n");
00047 }
00048
00049 private:
00050 RtAudio* output;
00051 bool properlyInitialized;
00052 GapeIntSample* soundBuffer;
00053 int soundBufferSize, currentBufferPosition;
00054 };
00055 #endif