00001 #ifndef INCLUDED_PORTAUDIO_STREAM_HXX
00002 #define INCLUDED_PORTAUDIO_STREAM_HXX
00003
00004 #include "pa_common/portaudio.h"
00005
00006
00007
00008
00009 namespace portaudio
00010 {
00011 class StreamParameters;
00012 }
00013
00014
00015
00016
00017 namespace portaudio
00018 {
00019
00020
00034 class Stream
00035 {
00036 public:
00037
00038 virtual ~Stream();
00039
00040 virtual void close();
00041 bool isOpen() const;
00042
00043
00044 void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
00045
00046
00047 void start();
00048 void stop();
00049 void abort();
00050
00051 bool isStopped() const;
00052 bool isActive() const;
00053
00054
00055 PaTime inputLatency() const;
00056 PaTime outputLatency() const;
00057 double sampleRate() const;
00058
00059
00060 PaTime time() const;
00061
00062
00063
00064 const PaStream *paStream() const;
00065 PaStream *paStream();
00066
00067 protected:
00068 Stream();
00069
00070 PaStream *stream_;
00071
00072 private:
00073 Stream(const Stream &);
00074 Stream &operator=(const Stream &);
00075 };
00076
00077
00078 }
00079
00080
00081 #endif // INCLUDED_PORTAUDIO_STREAM_HXX
00082