Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

Stream.hxx

Go to the documentation of this file.
00001 #ifndef INCLUDED_PORTAUDIO_STREAM_HXX
00002 #define INCLUDED_PORTAUDIO_STREAM_HXX
00003 
00004 #include "pa_common/portaudio.h"
00005 
00006 // ---------------------------------------------------------------------------------------
00007 
00008 // Forward declaration(s):
00009 namespace portaudio
00010 {
00011     class StreamParameters;
00012 }
00013 
00014 // ---------------------------------------------------------------------------------------
00015 
00016 // Declaration(s):
00017 namespace portaudio
00018 {
00019 
00020 
00034     class Stream
00035     {
00036     public:
00037         // Opening/closing:
00038         virtual ~Stream();
00039 
00040         virtual void close();
00041         bool isOpen() const;
00042 
00043         // Additional set up:
00044         void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
00045 
00046         // State management:
00047         void start();
00048         void stop();
00049         void abort();
00050 
00051         bool isStopped() const;
00052         bool isActive() const;
00053 
00054         // Stream info (time-constant, but might become time-variant soon):
00055         PaTime inputLatency() const;
00056         PaTime outputLatency() const;
00057         double sampleRate() const;
00058 
00059         // Stream info (time-varying):
00060         PaTime time() const;
00061 
00062         // Accessors for PortAudio PaStream, useful for interfacing 
00063         // with PortAudio add-ons (such as PortMixer) for instance:
00064         const PaStream *paStream() const;
00065         PaStream *paStream();
00066 
00067     protected:
00068         Stream(); // abstract class
00069 
00070         PaStream *stream_;
00071 
00072     private:
00073         Stream(const Stream &); // non-copyable
00074         Stream &operator=(const Stream &); // non-copyable
00075     };
00076 
00077 
00078 } // namespace portaudio
00079 
00080 
00081 #endif // INCLUDED_PORTAUDIO_STREAM_HXX
00082 

Generated on Fri Apr 2 20:22:15 2004 for PortAudioCpp by doxygen 1.3.6