This commit is contained in:
2020-04-04 17:19:13 +02:00
parent 2cb0a7449a
commit f36bfab5aa
78 changed files with 4370 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Preprocessor options</title><link rel="stylesheet" href="ts3doc.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="up" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="prev" href="ar01s15.html" title="Encoder options"><link rel="next" href="ar01s17.html" title="Playback options"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><img id="logo" src="images/logo.png"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Preprocessor options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s15.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center"><EFBFBD></th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s17.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="preproc"></a>Preprocessor options</h2></div></div></div><p>Sound input is preprocessed by the Client Lib before the data is encoded and sent to the TeamSpeak 3 server. The preprocessor<a class="indexterm" name="idm44835434440096"></a> is responsible for noise suppression, automatic gain control (AGC)<a class="indexterm" name="idm44835434439504"></a><a class="indexterm" name="idm44835434439120"></a> and voice activity detection (VAD)<a class="indexterm" name="idm44835434438608"></a><a class="indexterm" name="idm44835434438224"></a>.</p><p>The preprocessor can be controlled by setting various preprocessor flags. These flags are unique to each server connection.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Preprocessor flags are tied to a capture device, so changing the values only makes sense after a device has been opened.</p></td></tr></table></div><p>Preprocessor flags can be queried using
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getPreProcessorConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
<a class="indexterm" name="idm44835434432752"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The proprocessor flag to be queried. The following keys are available:</p><div class="itemizedlist"><ul type="circle"><li><p>&#8220;<span class="quote">name</span>&#8221;</p><p>Type of the used preprocessor. Currently this returns a constant string &#8220;<span class="quote">Speex preprocessor</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">denoise</span>&#8221;</p><p>Check if noise suppression is enabled. Returns &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">vad</span>&#8221;</p><p>Check if Voice Activity Detection is enabled. Returns &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">voiceactivation_level</span>&#8221;</p><p>Checks the Voice Activity Detection level in decibel. Returns a string with a numeric value, convert this to an integer.</p></li><li><p>&#8220;<span class="quote">vad_extrabuffersize</span>&#8221;</p><p>Checks Voice Activity Detection extrabuffer size. Returns a string with a numeric value.</p></li><li><p>&#8220;<span class="quote">agc</span>&#8221;</p><p>Check if Automatic Gain Control is enabled. Returns &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">agc_level</span>&#8221;</p><p>Checks AGC level. Returns a string with a numeric value.</p></li><li><p>&#8220;<span class="quote">agc_max_gain</span>&#8221;</p><p>Checks AGC max gain. Returns a string with a numeric value.</p></li><li><p>&#8220;<span class="quote">echo_canceling</span>&#8221;</p><p>Checks if echo canceling is enabled. Returns a string with a boolean value.</p></li></ul></div></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result as a string encoded in UTF-8 format. If no error occured the returned string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result string is uninitialized and must not be released.</p><div class="literallayout"><p><br>
</p></div><p>To configure the proprocessor use
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_setPreProcessorConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">value</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>const char* <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
<a class="indexterm" name="idm44835434407216"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The preprocessor flag to be configure. The following keys can be changed:</p><div class="itemizedlist"><ul type="circle"><li><p>&#8220;<span class="quote">denoise</span>&#8221;</p><p>Enable or disable noise suppression. Value can be &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;. Enabled by default.</p></li><li><p>&#8220;<span class="quote">vad</span>&#8221;</p><p>Enable or disable Voice Activity Detection. Value can be &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;. Enabled by default.</p></li><li><p>&#8220;<span class="quote">voiceactivation_level</span>&#8221;</p><p>Voice Activity Detection level in decibel. Numeric value converted to string. A high voice activation level means you have to speak louder into the microphone in order to start transmitting.</p><p>Reasonable values range from -50 to 50. Default is 0.</p><p>To adjust the VAD level in your client, you can call <code class="function">ts3client_getPreProcessorInfoValueFloat</code> with the identifier &#8220;<span class="quote">decibel_last_period</span>&#8221; over a period of time to query the current voice input level.</p></li><li><p>&#8220;<span class="quote">vad_extrabuffersize</span>&#8221;</p><p>Voice Activity Detection extrabuffer size. Numeric value converted to string. Should be &#8220;<span class="quote">0</span>&#8221; to &#8220;<span class="quote">8</span>&#8221;, defaults to &#8220;<span class="quote">2</span>&#8221;. Lower value means faster transmission, higher value means better VAD quality but higher latency.</p></li><li><p>&#8220;<span class="quote">agc</span>&#8221;</p><p>Enable or disable Automatic Gain Control. Value can be &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;. Enabled by default.</p></li><li><p>&#8220;<span class="quote">agc_level</span>&#8221;</p><p>AGC level. Numeric value converted to string. Default is &#8220;<span class="quote">16000</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">agc_max_gain</span>&#8221;</p><p>AGC max gain. Numeric value converted to string. Default is &#8220;<span class="quote">30</span>&#8221;.</p></li><li><p>&#8220;<span class="quote">echo_canceling</span>&#8221;</p><p>Enable echo canceling. Boolean value converted to string. Default is &#8220;<span class="quote">false</span>&#8221;.</p></li></ul></div></li><li><p><em class="parameter"><code>value</code></em></p><p>String value to be set for the given preprocessor identifier. In case of on/off switches, use &#8220;<span class="quote">true</span>&#8221; or &#8220;<span class="quote">false</span>&#8221;.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>It is not necessary to change all those values. The default values are reasonable. &#8220;<span class="quote">voiceactivation_level</span>&#8221; is often the only value that needs to be adjusted.</p></td></tr></table></div><div class="literallayout"><p><br>
</p></div><p>The following function retrieves preprocessor information as a floating-point variable instead of a string:
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getPreProcessorInfoValueFloat</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>float* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
<a class="indexterm" name="idm44835434377440"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The proprocessor flag to be queried. Currently the only valid identifier for this function is &#8220;<span class="quote">decibel_last_period</span>&#8221;, which can be used to adjust the VAD level as described above.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result value as a float.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s15.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><EFBFBD></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s17.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Encoder options<6E></td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"><EFBFBD>Playback options</td></tr></table></div></body></html>