mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
80 lines
7.3 KiB
HTML
80 lines
7.3 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.5.8 -->
|
|
<div class="navpath"><a class="el" href="dir_c28bfe24b93fcab464ea84f988cb34ef.html">include</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>InetWvOut.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STK_INETWVOUT_H</span>
|
|
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STK_INETWVOUT_H</span>
|
|
<a name="l00003"></a>00003 <span class="preprocessor"></span>
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#include "WvOut.h"</span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#include "Socket.h"</span>
|
|
<a name="l00006"></a>00006
|
|
<a name="l00007"></a>00007 <span class="keyword">namespace </span>stk {
|
|
<a name="l00008"></a>00008
|
|
<a name="l00009"></a>00009 <span class="comment">/***************************************************/</span>
|
|
<a name="l00030"></a>00030 <span class="comment">/***************************************************/</span>
|
|
<a name="l00031"></a>00031
|
|
<a name="l00032"></a><a class="code" href="classstk_1_1InetWvOut.html">00032</a> <span class="keyword">class </span><a class="code" href="classstk_1_1InetWvOut.html" title="STK internet streaming output class.">InetWvOut</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1WvOut.html" title="STK audio output abstract base class.">WvOut</a>
|
|
<a name="l00033"></a>00033 {
|
|
<a name="l00034"></a>00034 <span class="keyword">public</span>:
|
|
<a name="l00036"></a>00036 <a class="code" href="classstk_1_1InetWvOut.html#cc7c0b00c68cb76d1b15e7187d67a966" title="Default constructor ... the socket is not instantiated.">InetWvOut</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> packetFrames = 1024 );
|
|
<a name="l00037"></a>00037
|
|
<a name="l00039"></a>00039
|
|
<a name="l00042"></a>00042 <a class="code" href="classstk_1_1InetWvOut.html#cc7c0b00c68cb76d1b15e7187d67a966" title="Default constructor ... the socket is not instantiated.">InetWvOut</a>( <span class="keywordtype">int</span> port, Socket::ProtocolType protocol = Socket::PROTO_TCP,
|
|
<a name="l00043"></a>00043 std::string hostname = <span class="stringliteral">"localhost"</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1, Stk::StkFormat format = <a class="code" href="classstk_1_1Stk.html#5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a>,
|
|
<a name="l00044"></a>00044 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> packetFrames = 1024 );
|
|
<a name="l00045"></a>00045
|
|
<a name="l00047"></a>00047 <a class="code" href="classstk_1_1InetWvOut.html#e58f286de491788df700479f88b3c625" title="Class destructor.">~InetWvOut</a>();
|
|
<a name="l00048"></a>00048
|
|
<a name="l00050"></a>00050
|
|
<a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1InetWvOut.html#4c8b6fb25c6d751b7929bec9a2d04a53" title="Connect to the specified host and port and prepare to stream nChannels of data in...">connect</a>( <span class="keywordtype">int</span> port, Socket::ProtocolType protocol = Socket::PROTO_TCP,
|
|
<a name="l00054"></a>00054 std::string hostname = <span class="stringliteral">"localhost"</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1, Stk::StkFormat format = <a class="code" href="classstk_1_1Stk.html#5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a> );
|
|
<a name="l00055"></a>00055
|
|
<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1InetWvOut.html#2314d2e2d005c5b08aa24d21075af638" title="If a connection is open, write out remaining samples in the queue and then disconnect...">disconnect</a>( <span class="keywordtype">void</span> );
|
|
<a name="l00058"></a>00058
|
|
<a name="l00060"></a>00060
|
|
<a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1InetWvOut.html#800f77228d851a2d276fae6a24bcdc9a" title="Output a single sample to all channels in a sample frame.">tick</a>( <span class="keyword">const</span> StkFloat sample );
|
|
<a name="l00066"></a>00066
|
|
<a name="l00068"></a>00068
|
|
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1InetWvOut.html#800f77228d851a2d276fae6a24bcdc9a" title="Output a single sample to all channels in a sample frame.">tick</a>( <span class="keyword">const</span> <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& frames );
|
|
<a name="l00078"></a>00078
|
|
<a name="l00079"></a>00079 <span class="keyword">protected</span>:
|
|
<a name="l00080"></a>00080
|
|
<a name="l00081"></a>00081 <span class="keywordtype">void</span> incrementFrame( <span class="keywordtype">void</span> );
|
|
<a name="l00082"></a>00082
|
|
<a name="l00083"></a>00083 <span class="comment">// Write a buffer of length frames via the socket connection.</span>
|
|
<a name="l00084"></a>00084 <span class="keywordtype">void</span> writeData( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> frames );
|
|
<a name="l00085"></a>00085
|
|
<a name="l00086"></a>00086 <span class="keywordtype">char</span> *buffer_;
|
|
<a name="l00087"></a>00087 <a class="code" href="classstk_1_1Socket.html" title="STK internet socket abstract base class.">Socket</a> *soket_;
|
|
<a name="l00088"></a>00088 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> bufferFrames_;
|
|
<a name="l00089"></a>00089 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> bufferBytes_;
|
|
<a name="l00090"></a>00090 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> bufferIndex_;
|
|
<a name="l00091"></a>00091 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> iData_;
|
|
<a name="l00092"></a>00092 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dataBytes_;
|
|
<a name="l00093"></a>00093 Stk::StkFormat dataType_;
|
|
<a name="l00094"></a>00094 };
|
|
<a name="l00095"></a>00095
|
|
<a name="l00096"></a>00096 } <span class="comment">// stk namespace</span>
|
|
<a name="l00097"></a>00097
|
|
<a name="l00098"></a>00098 <span class="preprocessor">#endif</span>
|
|
</pre></div></div>
|
|
<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-2009 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|