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 streaming input class.
Definition: InetWvIn.h:44
StkFloat tick(unsigned int channel=0)
Compute a sample frame and return the specified channel value.
~InetWvIn()
Class destructor.
bool isConnected(void)
Returns true is an input connection exists or input data remains in the queue.
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed frame.
Definition: InetWvIn.h:141
InetWvIn(unsigned long bufferFrames=1024, unsigned int nBuffers=8)
Default constructor.
StkFrames & tick(StkFrames &frames, unsigned int channel=0)
Fill the StkFrames object with computed sample frames, starting at the specified channel and return t...
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 mutex class.
Definition: Mutex.h:37
STK internet socket abstract base class.
Definition: Socket.h:39
An STK class to handle vectorized audio data.
Definition: Stk.h:276
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
static const StkFormat STK_SINT16
Definition: Stk.h:138
STK thread class.
Definition: Thread.h:50
STK audio input abstract base class.
Definition: WvIn.h:20
The STK namespace.
Definition: ADSR.h:6