Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00026 /***************************************************/ 00027 00028 #ifndef STK_TCPWVOUT_H 00029 #define STK_TCPWVOUT_H 00030 00031 #include "WvOut.h" 00032 #include "Socket.h" 00033 00034 class TcpWvOut : protected WvOut 00035 { 00036 public: 00038 TcpWvOut(); 00039 00041 00044 TcpWvOut(int port, const char *hostname = "localhost", unsigned int nChannels = 1, Stk::StkFormat format = STK_SINT16); 00045 00047 ~TcpWvOut(); 00048 00050 00053 void connect(int port, const char *hostname = "localhost", unsigned int nChannels = 1, Stk::StkFormat format = STK_SINT16); 00054 00056 void disconnect(void); 00057 00059 unsigned long getFrames( void ) const; 00060 00062 StkFloat getTime( void ) const; 00063 00065 00068 void tick( const StkFloat sample ); 00069 00071 00074 void tick( const StkFloat *vector, unsigned int vectorSize ); 00075 00077 00083 void tick( const StkFrames& frames, unsigned int channel = 1 ); 00084 00086 00089 void tickFrame( const StkFloat *frameVector, unsigned int frames = 1 ); 00090 00092 00097 virtual void tickFrame( const StkFrames& frames ); 00098 00099 protected: 00100 00101 // Write a buffer of length \e frames via the socket connection. 00102 void writeData( unsigned long frames ); 00103 00104 char *buffer_; 00105 Socket *soket_; 00106 int dataSize_; 00107 }; 00108 00109 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |