2 #ifdef STK_MUTEXT_SUPPORTED
53 InetWvIn(
unsigned long bufferFrames = 1024,
unsigned int nBuffers = 8 );
66 void listen(
int port = 2006,
unsigned int nChannels = 1,
68 Socket::ProtocolType protocol = Socket::PROTO_TCP );
87 StkFloat
lastOut(
unsigned int channel = 0 );
100 StkFloat
tick(
unsigned int channel = 0 );
118 void receive(
void );
123 int readData(
void );
129 unsigned long bufferFrames_;
130 unsigned long bufferBytes_;
131 unsigned long bytesFilled_;
132 unsigned int nBuffers_;
133 unsigned long writePoint_;
134 unsigned long readPoint_;
139 ThreadInfo threadInfo_;
140 Stk::StkFormat dataType_;
146 #if defined(_STK_DEBUG_)
147 if ( channel >= data_.
channels() ) {
148 oStream_ <<
"InetWvIn::lastOut(): channel argument and data stream are incompatible!";
154 if ( !connected_ && bytesFilled_ == 0 && bufferCounter_ == 0 )
return 0.0;
156 return lastFrame_[channel];
STK internet streaming input class.
Definition: InetWvIn.h:47
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:144
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:51
An STK class to handle vectorized audio data.
Definition: Stk.h:287
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:415
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:149
STK thread class.
Definition: Thread.h:63
STK audio input abstract base class.
Definition: WvIn.h:20
The STK namespace.
Definition: ADSR.h:8