50 InetWvIn(
unsigned long bufferFrames = 1024,
unsigned int nBuffers = 8 );
63 void listen(
int port = 2006,
unsigned int nChannels = 1,
65 Socket::ProtocolType protocol = Socket::PROTO_TCP );
84 StkFloat
lastOut(
unsigned int channel = 0 );
97 StkFloat
tick(
unsigned int channel = 0 );
115 void receive(
void );
120 int readData(
void );
126 unsigned long bufferFrames_;
127 unsigned long bufferBytes_;
128 unsigned long bytesFilled_;
129 unsigned int nBuffers_;
130 unsigned long writePoint_;
131 unsigned long readPoint_;
136 ThreadInfo threadInfo_;
137 Stk::StkFormat dataType_;
143 #if defined(_STK_DEBUG_)
144 if ( channel >= data_.
channels() ) {
145 oStream_ <<
"InetWvIn::lastOut(): channel argument and data stream are incompatible!";
151 if ( !connected_ && bytesFilled_ == 0 && bufferCounter_ == 0 )
return 0.0;
153 return lastFrame_[channel];
STK internet socket abstract base class.
Definition: Socket.h:38
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
~InetWvIn()
Class destructor.
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:416
StkFloat tick(unsigned int channel=0)
Compute a sample frame and return the specified channel value.
bool isConnected(void)
Returns true is an input connection exists or input data remains in the queue.
STK audio input abstract base class.
Definition: WvIn.h:19
void listen(int port=2006, unsigned int nChannels=1, Stk::StkFormat format=STK_SINT16, Socket::ProtocolType protocol=Socket::PROTO_TCP)
Wait for a (new) socket connection with specified protocol, port, data channels and format...
STK thread class.
Definition: Thread.h:49
STK mutex class.
Definition: Mutex.h:36
An STK class to handle vectorized audio data.
Definition: Stk.h:278
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed frame.
Definition: InetWvIn.h:141
static const StkFormat STK_SINT16
Definition: Stk.h:141
InetWvIn(unsigned long bufferFrames=1024, unsigned int nBuffers=8)
Default constructor.
STK internet streaming input class.
Definition: InetWvIn.h:43