mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
178 lines
9.1 KiB
HTML
178 lines
9.1 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
|
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF">
|
|
<CENTER>
|
|
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
|
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.4.4 -->
|
|
<h1>InetWvIn Class Reference</h1><!-- doxytag: class="InetWvIn" --><!-- doxytag: inherits="WvIn" --><code>#include <<a class="el" href="InetWvIn_8h-source.html">InetWvIn.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for InetWvIn:
|
|
<p><center><img src="classInetWvIn.png" usemap="#InetWvIn_map" border="0" alt=""></center>
|
|
<map name="InetWvIn_map">
|
|
<area href="classWvIn.html" alt="WvIn" shape="rect" coords="0,56,60,80">
|
|
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,60,24">
|
|
</map>
|
|
<a href="classInetWvIn-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK internet streaming input class.
|
|
<p>
|
|
This Wvin subclass reads streamed audio data over a network via a TCP or UDP socket connection. The data is assumed in big-endian, or network, byte order. Only a single socket connection is supported.<p>
|
|
InetWvIn supports multi-channel data. It is important to distinguish the <a class="el" href="classWvIn.html#a5">tick()</a> methods, which return samples produced by averaging across sample frames, from the <a class="el" href="classWvIn.html#a7">tickFrame()</a> methods, which return references or pointers to multi-channel sample frames.<p>
|
|
This class implements a socket server. When using the TCP protocol, the server "listens" for a single remote connection within the InetWvIn::start() function. For the UDP protocol, no attempt is made to verify packet delivery or order. The default data type for the incoming stream is signed 16-bit integers, though any of the defined StkFormats are permissible.<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
|
|
<p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvIn.html#a0">InetWvIn</a> (unsigned long bufferFrames=1024, unsigned int nBuffers=8)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="InetWvIn::~InetWvIn" ref="a1" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvIn.html#a1">~InetWvIn</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvIn.html#a2">listen</a> (int port=2006, unsigned int nChannels=1, Stk::StkFormat format=<a class="el" href="classStk.html#s1">STK_SINT16</a>, Socket::ProtocolType protocol=Socket::PROTO_TCP)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for a (new) socket connection with specified protocol, port, data channels and format. <a href="#a2"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvIn.html#a3">isConnected</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true is an input connection exists or input data remains in the queue. <a href="#a3"></a><br></td></tr>
|
|
</table>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="a0"></a><!-- doxytag: member="InetWvIn::InetWvIn" ref="a0" args="(unsigned long bufferFrames=1024, unsigned int nBuffers=8)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">InetWvIn::InetWvIn </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">unsigned long </td>
|
|
<td class="mdname" nowrap> <em>bufferFrames</em> = <code>1024</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nBuffers</em> = <code>8</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Default constructor.
|
|
<p>
|
|
An <a class="el" href="classStkError.html">StkError</a> will be thrown if an error occurs while initializing the input thread. </td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="a2"></a><!-- doxytag: member="InetWvIn::listen" ref="a2" args="(int port=2006, unsigned int nChannels=1, Stk::StkFormat format=STK_SINT16, Socket::ProtocolType protocol=Socket::PROTO_TCP)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void InetWvIn::listen </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">int </td>
|
|
<td class="mdname" nowrap> <em>port</em> = <code>2006</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nChannels</em> = <code>1</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>Stk::StkFormat </td>
|
|
<td class="mdname" nowrap> <em>format</em> = <code><a class="el" href="classStk.html#s1">STK_SINT16</a></code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>Socket::ProtocolType </td>
|
|
<td class="mdname" nowrap> <em>protocol</em> = <code>Socket::PROTO_TCP</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Wait for a (new) socket connection with specified protocol, port, data channels and format.
|
|
<p>
|
|
For the UDP protocol, this function will create a socket instance and return. For the TCP protocol, this function will block until a connection is established. An <a class="el" href="classStkError.html">StkError</a> will be thrown if a socket error occurs or an invalid function argument is provided. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a3"></a><!-- doxytag: member="InetWvIn::isConnected" ref="a3" args="(void)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">bool InetWvIn::isConnected </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">void </td>
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Returns true is an input connection exists or input data remains in the queue.
|
|
<p>
|
|
This method will not return false after an input connection has been closed until all buffered input data has been read out. </td>
|
|
</tr>
|
|
</table>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="InetWvIn_8h-source.html">InetWvIn.h</a></ul>
|
|
<HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|