Files
stk/doc/html/classInetWvOut.html
2013-09-29 23:41:50 +02:00

183 lines
10 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"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="faq.html">FAQ</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>InetWvOut Class Reference</h1><!-- doxytag: class="InetWvOut" --><!-- doxytag: inherits="WvOut" --><code>#include &lt;<a class="el" href="InetWvOut_8h-source.html">InetWvOut.h</a>&gt;</code>
<p>
<p>Inheritance diagram for InetWvOut:
<p><center><img src="classInetWvOut.png" usemap="#InetWvOut_map" border="0" alt=""></center>
<map name="InetWvOut_map">
<area href="classWvOut.html" alt="WvOut" shape="rect" coords="0,56,70,80">
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,70,24">
</map>
<a href="classInetWvOut-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
STK internet streaming output class.
<p>
This <a class="el" href="classWvOut.html">WvOut</a> subclass can stream data over a network via a TCP or UDP socket connection. The data is converted to big-endian byte order, if necessary, before being transmitted.<p>
InetWvOut supports multi-channel data. It is important to distinguish the <a class="el" href="classWvOut.html#a6">tick()</a> methods, which output single samples to all channels in a sample frame, from the <a class="el" href="classWvOut.html#a8">tickFrame()</a> method, which takes a reference to multi-channel sample frame data.<p>
This class connects to a socket server, the port and IP address of which must be specified as constructor arguments. The default data type is signed 16-bit integers but 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"><a class="anchor" name="a0"></a><!-- doxytag: member="InetWvOut::InetWvOut" ref="a0" args="(unsigned long packetFrames=1024)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvOut.html#a0">InetWvOut</a> (unsigned long packetFrames=1024)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor ... the socket is not instantiated. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvOut.html#a1">InetWvOut</a> (int port, Socket::ProtocolType protocol=Socket::PROTO_TCP, std::string hostname=&quot;localhost&quot;, unsigned int nChannels=1, Stk::StkFormat format=<a class="el" href="classStk.html#s1">STK_SINT16</a>, unsigned long packetFrames=1024)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Overloaded constructor which opens a network connection during instantiation. <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="InetWvOut::~InetWvOut" ref="a2" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvOut.html#a2">~InetWvOut</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvOut.html#a3">connect</a> (int port, Socket::ProtocolType protocol=Socket::PROTO_TCP, std::string hostname=&quot;localhost&quot;, unsigned int nChannels=1, Stk::StkFormat format=<a class="el" href="classStk.html#s1">STK_SINT16</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect to the specified host and port and prepare to stream <em>nChannels</em> of data in the given data format. <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="InetWvOut::disconnect" ref="a4" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInetWvOut.html#a4">disconnect</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If a connection is open, write out remaining samples in the queue and then disconnect. <br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a1"></a><!-- doxytag: member="InetWvOut::InetWvOut" ref="a1" args="(int port, Socket::ProtocolType protocol=Socket::PROTO_TCP, std::string hostname=&quot;localhost&quot;, unsigned int nChannels=1, Stk::StkFormat format=STK_SINT16, unsigned long packetFrames=1024)" --><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">InetWvOut::InetWvOut </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">int&nbsp;</td>
<td class="mdname" nowrap> <em>port</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>Socket::ProtocolType&nbsp;</td>
<td class="mdname" nowrap> <em>protocol</em> = <code>Socket::PROTO_TCP</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>std::string&nbsp;</td>
<td class="mdname" nowrap> <em>hostname</em> = <code>&quot;localhost&quot;</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</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&nbsp;</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>unsigned long&nbsp;</td>
<td class="mdname" nowrap> <em>packetFrames</em> = <code>1024</code></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Overloaded constructor which opens a network connection during instantiation.
<p>
An <a class="el" href="classStkError.html">StkError</a> is thrown if a socket error occurs or an invalid argument is specified. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3"></a><!-- doxytag: member="InetWvOut::connect" ref="a3" args="(int port, Socket::ProtocolType protocol=Socket::PROTO_TCP, std::string hostname=&quot;localhost&quot;, unsigned int nChannels=1, Stk::StkFormat format=STK_SINT16)" --><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 InetWvOut::connect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">int&nbsp;</td>
<td class="mdname" nowrap> <em>port</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>Socket::ProtocolType&nbsp;</td>
<td class="mdname" nowrap> <em>protocol</em> = <code>Socket::PROTO_TCP</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>std::string&nbsp;</td>
<td class="mdname" nowrap> <em>hostname</em> = <code>&quot;localhost&quot;</code>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</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&nbsp;</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"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Connect to the specified host and port and prepare to stream <em>nChannels</em> of data in the given data format.
<p>
An <a class="el" href="classStkError.html">StkError</a> is thrown if a socket error occurs or an invalid argument is specified. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="InetWvOut_8h-source.html">InetWvOut.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>&copy;1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>