Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

InetWvOut.h
1 #ifndef STK_INETWVOUT_H
2 #define STK_INETWVOUT_H
3
4 #include "WvOut.h"
5 #include "Socket.h"
6
7 namespace stk {
8
9 /***************************************************/
30 /***************************************************/
31
32 class InetWvOut : public WvOut
33 {
34 public:
36 InetWvOut( unsigned long packetFrames = 1024 );
37
39
42 InetWvOut( int port, Socket::ProtocolType protocol = Socket::PROTO_TCP,
43 std::string hostname = "localhost", unsigned int nChannels = 1, Stk::StkFormat format = STK_SINT16,
44 unsigned long packetFrames = 1024 );
45
47 ~InetWvOut();
48
50
53 void connect( int port, Socket::ProtocolType protocol = Socket::PROTO_TCP,
54 std::string hostname = "localhost", unsigned int nChannels = 1, Stk::StkFormat format = STK_SINT16 );
55
57 void disconnect( void );
58
60
65 void tick( const StkFloat sample );
66
68
77 void tick( const StkFrames& frames );
78
79 protected:
80
81 void incrementFrame( void );
82
83 // Write a buffer of length frames via the socket connection.
84 void writeData( unsigned long frames );
85
86 char *buffer_;
87 Socket *soket_;
88 unsigned long bufferFrames_;
89 unsigned long bufferBytes_;
90 unsigned long bufferIndex_;
91 unsigned long iData_;
92 unsigned int dataBytes_;
93 Stk::StkFormat dataType_;
94 };
95
96 } // stk namespace
97
98 #endif

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