mirror of
https://github.com/thestk/stk
synced 2026-01-15 14:01:52 +00:00
92 lines
5.2 KiB
HTML
92 lines
5.2 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"><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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.2.8.1 -->
|
|
<h1>TcpWvIn.h</h1><div class="fragment"><pre>00001 <font class="comment">/***************************************************/</font>
|
|
00027 <font class="comment">/***************************************************/</font>
|
|
00028
|
|
00029 <font class="preprocessor">#if !defined(__TCPWVIN_H)</font>
|
|
00030 <font class="preprocessor"></font><font class="preprocessor">#define __TCPWVIN_H</font>
|
|
00031 <font class="preprocessor"></font>
|
|
00032 <font class="preprocessor">#include "WvIn.h"</font>
|
|
00033 <font class="preprocessor">#include "Socket.h"</font>
|
|
00034 <font class="preprocessor">#include "Thread.h"</font>
|
|
00035
|
|
00036 <font class="keyword">typedef</font> <font class="keyword">struct </font>{
|
|
00037 <font class="keywordtype">bool</font> finished;
|
|
00038 <font class="keywordtype">void</font> *object;
|
|
00039 } thread_info;
|
|
00040
|
|
00041 <font class="keyword">class </font><a class="code" href="classTcpWvIn.html">TcpWvIn</a> : <font class="keyword">protected</font> <a class="code" href="classWvIn.html">WvIn</a>
|
|
00042 {
|
|
00043 <font class="keyword">public</font>:
|
|
00045
|
|
00048 <a class="code" href="classTcpWvIn.html#a0">TcpWvIn</a>( <font class="keywordtype">int</font> port = 2006 );
|
|
00049
|
|
00051 <a class="code" href="classTcpWvIn.html#a1">~TcpWvIn</a>();
|
|
00052
|
|
00054
|
|
00057 <font class="keywordtype">void</font> <a class="code" href="classTcpWvIn.html#a2">listen</a>(<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> nChannels = 1, Stk::STK_FORMAT format = STK_SINT16);
|
|
00058
|
|
00060
|
|
00064 <font class="keywordtype">bool</font> <a class="code" href="classTcpWvIn.html#a3">isConnected</a>(<font class="keywordtype">void</font>);
|
|
00065
|
|
00067 MY_FLOAT <a class="code" href="classWvIn.html#a15">lastOut</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
|
00068
|
|
00070 MY_FLOAT <a class="code" href="classWvIn.html#a16">tick</a>(<font class="keywordtype">void</font>);
|
|
00071
|
|
00073 MY_FLOAT *<a class="code" href="classWvIn.html#a16">tick</a>(MY_FLOAT *vector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> vectorSize);
|
|
00074
|
|
00076 <font class="keyword">const</font> MY_FLOAT *<a class="code" href="classWvIn.html#a18">lastFrame</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
|
00077
|
|
00079 <font class="keyword">const</font> MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(<font class="keywordtype">void</font>);
|
|
00080
|
|
00082 MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(MY_FLOAT *frameVector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> frames);
|
|
00083
|
|
00084 <font class="comment">// Called by the thread routine to receive data via the socket connection</font>
|
|
00085 <font class="comment">// and fill the socket buffer. This is not intended for general use but</font>
|
|
00086 <font class="comment">// had to be made public for access from the thread.</font>
|
|
00087 <font class="keywordtype">void</font> receive(<font class="keywordtype">void</font>);
|
|
00088
|
|
00089 <font class="keyword">protected</font>:
|
|
00090
|
|
00091 <font class="comment">// Initialize class variables.</font>
|
|
00092 <font class="keywordtype">void</font> init( <font class="keywordtype">int</font> port );
|
|
00093
|
|
00094 <font class="comment">// Read buffered socket data into the data buffer ... will block if none available.</font>
|
|
00095 <font class="keywordtype">int</font> readData( <font class="keywordtype">void</font> );
|
|
00096
|
|
00097 <a class="code" href="classSocket.html">Socket</a> *soket;
|
|
00098 <a class="code" href="classThread.html">Thread</a> *thread;
|
|
00099 Mutex mutex;
|
|
00100 <font class="keywordtype">char</font> *buffer;
|
|
00101 <font class="keywordtype">long</font> bufferBytes;
|
|
00102 <font class="keywordtype">long</font> bytesFilled;
|
|
00103 <font class="keywordtype">long</font> writePoint;
|
|
00104 <font class="keywordtype">long</font> readPoint;
|
|
00105 <font class="keywordtype">long</font> counter;
|
|
00106 <font class="keywordtype">int</font> dataSize;
|
|
00107 <font class="keywordtype">bool</font> connected;
|
|
00108 <font class="keywordtype">int</font> fd;
|
|
00109 thread_info threadInfo;
|
|
00110
|
|
00111 };
|
|
00112
|
|
00113 <font class="preprocessor">#endif</font>
|
|
</font></pre></div><HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|