Home Information Classes Download Usage Mail List Requirements Links Tutorial

# TcpWvOut.h

    00001 /***************************************************/
    00026 /***************************************************/
    00027
    00028 #if !defined(__TCPWVOUT_H)
    00029 #define __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::STK_FORMAT format = STK_SINT16);
    00045
    00047   ~TcpWvOut();
    00048
    00050
    00053   void connect(int port, const char *hostname = "localhost", unsigned int nChannels = 1, Stk::STK_FORMAT format = STK_SINT16);
    00054
    00056   void disconnect(void);
    00057
    00059   unsigned long getFrames( void ) const;
    00060
    00062   MY_FLOAT getTime( void ) const;
    00063
    00065
    00068   void tick(MY_FLOAT sample);
    00069
    00071
    00074   void tick(const MY_FLOAT *vector, unsigned int vectorSize);
    00075
    00077
    00080   void tickFrame(const MY_FLOAT *frameVector, unsigned int frames = 1);
    00081
    00082  protected:
    00083
    00084   // Write a buffer of length \e frames via the socket connection.
    00085   void writeData( unsigned long frames );
    00086
    00087   char msg[256];
    00088   char *buffer;
    00089   Socket *soket;
    00090   int dataSize;
    00091 };
    00092
    00093 #endif // defined(__TCPWVOUT_H)

The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.