Files
ts-mobile-go/docs/teamspeak-sdk-3.5.2/doc/client/preprocessor.html
T
2026-07-20 19:01:03 +08:00

310 lines
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Preprocessor options &mdash; TeamSpeak SDK documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=9edc463e" />
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=7f41d439"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Playback options" href="playback-options.html" />
<link rel="prev" title="Encoder options" href="encoder.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
TeamSpeak SDK
<img src="../_static/logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../errors.html">TeamSpeak Error Codes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../properties.html">Property Enums</a></li>
<li class="toctree-l1"><a class="reference internal" href="../enumerations.html">Structures &amp; Enumerations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../client_api.html">TeamSpeak Client Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server_api.html">TeamSpeak Server Functions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Server</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../server/intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/basic.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/list-items.html">List available clients, channels, servers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/vserver-manage.html">Create and stop virtual servers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/advanced-create.html">Advanced virtual server creation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/info.html">Retrieve and store information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/channels.html">Managing channels</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/clients.html">Managing clients</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/whisper.html">Whisper lists</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/encryption.html">Custom encryption</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/passwords.html">Custom passwords</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/permissions.html">Permission checks</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/security-salt.html">Security salts and hashes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/disable-commands.html">Disabling protocol commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/filetransfer.html">Filetransfer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../server/faq.html">FAQ</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Client</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="basic.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="connections.html">Managing server connections</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging.html">Logging</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="audio.html">Client Audio</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="audio-list-device-mode.html">List available modes and devices</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-init.html">Initializing devices</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-get-current.html">Query current mode and device</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-custom-device.html">Using custom devices</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-activate.html">Activating the capture device</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-close.html">Closing devices</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-codecs.html">Audio codecs</a></li>
<li class="toctree-l2"><a class="reference internal" href="encoder.html">Encoder options</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Preprocessor options</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#available-config-values">Available config values</a></li>
<li class="toctree-l3"><a class="reference internal" href="#querying-values">Querying values</a></li>
<li class="toctree-l3"><a class="reference internal" href="#setting-values">Setting values</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="playback-options.html">Playback options</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-buffer-access.html">Accessing the voice buffer</a></li>
<li class="toctree-l2"><a class="reference internal" href="audio-localtest.html">Local Test mode</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="wave-files.html">Playing wave files</a></li>
<li class="toctree-l1"><a class="reference internal" href="3dsound.html">3D Sound</a></li>
<li class="toctree-l1"><a class="reference internal" href="whisper.html">Whisper lists</a></li>
<li class="toctree-l1"><a class="reference internal" href="voice-encryption.html">Channel voice data encryption</a></li>
<li class="toctree-l1"><a class="reference internal" href="info.html">Retrieve and store information</a></li>
<li class="toctree-l1"><a class="reference internal" href="channels.html">Channel Management</a></li>
<li class="toctree-l1"><a class="reference internal" href="client-list.html">List clients</a></li>
<li class="toctree-l1"><a class="reference internal" href="client-kick.html">Kicking clients</a></li>
<li class="toctree-l1"><a class="reference internal" href="local-mute.html">Muting other clients</a></li>
<li class="toctree-l1"><a class="reference internal" href="textmessages.html">Text chat</a></li>
<li class="toctree-l1"><a class="reference internal" href="filetransfer.html">Filetransfer</a></li>
<li class="toctree-l1"><a class="reference internal" href="encryption.html">Custom encryption</a></li>
<li class="toctree-l1"><a class="reference internal" href="passwords.html">Custom passwords</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">TeamSpeak SDK</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="audio.html">Client Audio</a></li>
<li class="breadcrumb-item active">Preprocessor options</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="preprocessor-options">
<h1>Preprocessor options<a class="headerlink" href="#preprocessor-options" title="Link to this heading"></a></h1>
<p id="preproc">Sound input is preprocessed by the Client Lib before the data is encoded
and sent to the TeamSpeak 3 server. The preprocessor is
responsible for noise suppression, automatic gain control (AGC) and voice
activity detection (VAD).</p>
<p>The preprocessor can be controlled by setting various preprocessor
flags. These flags are stored per server connection and can differ between
server connections.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Preprocessor flags are tied to a capture device, so changing the
values only makes sense after a device has been opened.</p>
</div>
<section id="available-config-values">
<h2>Available config values<a class="headerlink" href="#available-config-values" title="Link to this heading"></a></h2>
<p>The following configuration values are available for querying and setting:</p>
<ul>
<li><p>name</p>
<p>The type of the preprocessor in use. Currently always returns
“Speex preprocessor”</p>
</li>
<li><p>denoise</p>
<p>Boolean value. Whether or not noise suppression is enabled.
Enabled by default.</p>
</li>
<li><p>vad</p>
<p>Boolean value. Whether or not voice activity detection is enabled.
Enabled by default.</p>
</li>
<li><p>voiceactivation_level</p>
<p>Integer holding the decibel level above which voice activity detection
is sending voice data to the server.</p>
<p>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>
</li>
<li><p>vad_extrabuffersize</p>
<p>Integer holding the buffer size for voice activity detection.</p>
<p>Valid values are 0 to 8. Defaults to 2. Lower value means faster
transmission, higher value means better VAD quality but higher latency.</p>
</li>
<li><p>agc</p>
<p>Boolean value. Whether or not automatic gain control is enabled.
Enabled by default.</p>
</li>
<li><p>agc_level</p>
<p>Integer. Automatic gain control level.
Defaults to 16000.</p>
</li>
<li><p>agc_main_gain</p>
<p>Integer holding the maximum gain for automatic gain control.
Defaults to 30.</p>
</li>
<li><p>echo_canceling</p>
<p>Boolean value. Whether echo cancelling feature is enabled.
Defaults to false.</p>
</li>
<li><p>decibel_last_period</p>
<p>Read only Float. Current input levels on the capture device.
Queried using <a class="reference internal" href="#c.ts3client_getPreProcessorInfoValueFloat" title="ts3client_getPreProcessorInfoValueFloat"><code class="xref c c-func docutils literal notranslate"><span class="pre">ts3client_getPreProcessorInfoValueFloat()</span></code></a></p>
</li>
</ul>
</section>
<section id="querying-values">
<h2>Querying values<a class="headerlink" href="#querying-values" title="Link to this heading"></a></h2>
<p>Preprocessor flags can be queried using:</p>
<dl class="c function">
<dt class="sig sig-object c">
<span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ts3client_getPreProcessorConfigValue</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">uint64</span></span><span class="w"> </span><span class="n"><span class="pre">serverConnectionHandlerID</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">ident</span></span>, <span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Retrieve preprocessor configuration values. </p>
<p>Preprocessor settings are bound to a capture device. You must open a capture device on the specified connection handler before calling this function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>serverConnectionHandlerID</strong> the connection handler for which to retrieve the configuration value </p></li>
<li><p><strong>ident</strong> the name of the preprocessor configuration to retrieve </p></li>
<li><p><strong>result</strong> address of a variable to receive a c string with the value of the specified preprocessor configuration. Memory is allocated by the client lib and must be freed by caller using <a class="reference internal" href="../client_api.html#clientlib_8h_1a783cbda7046acfc0173c669821702619"><span class="std std-ref">ts3client_freeMemory</span></a></p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An Error code from the <a class="reference internal" href="../errors.html#public__errors_8h_1a0bcf1e0a5e32989890f6e85064327f7b"><span class="std std-ref">Ts3ErrorType</span></a> enum indicating either success or the failure reason </p>
</dd>
</dl>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c">
<span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ts3client_getPreProcessorInfoValueFloat</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">uint64</span></span><span class="w"> </span><span class="n"><span class="pre">serverConnectionHandlerID</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">ident</span></span>, <span class="kt"><span class="pre">float</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">result</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Retrieve floating point preprocessor configuration values. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>serverConnectionHandlerID</strong> the connection handler for which to retrieve the value </p></li>
<li><p><strong>ident</strong> the name of the preprocessor value to retrieve </p></li>
<li><p><strong>result</strong> address of a variable to receive the specified configuration value </p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An Error code from the <a class="reference internal" href="../errors.html#public__errors_8h_1a0bcf1e0a5e32989890f6e85064327f7b"><span class="std std-ref">Ts3ErrorType</span></a> enum indicating either success or the failure reason </p>
</dd>
</dl>
</dd></dl>
</section>
<section id="setting-values">
<h2>Setting values<a class="headerlink" href="#setting-values" title="Link to this heading"></a></h2>
<p>To configure the proprocessor use</p>
<dl class="c function">
<dt class="sig sig-object c">
<span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ts3client_setPreProcessorConfigValue</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">uint64</span></span><span class="w"> </span><span class="n"><span class="pre">serverConnectionHandlerID</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">ident</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">value</span></span><span class="sig-paren">)</span><br /></dt>
<dd><p>Set preprocessor configuration values. </p>
<p>Preprocessor settings are bound to a capture device. You must open a capture device on the specified connection handler before calling this function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>serverConnectionHandlerID</strong> the connection handler for which to retrieve the configuration value </p></li>
<li><p><strong>ident</strong> the name of the preprocessor configuration to retrieve </p></li>
<li><p><strong>value</strong> the new value to set </p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An Error code from the <a class="reference internal" href="../errors.html#public__errors_8h_1a0bcf1e0a5e32989890f6e85064327f7b"><span class="std std-ref">Ts3ErrorType</span></a> enum indicating either success or the failure reason </p>
</dd>
</dl>
</dd></dl>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>For boolean values use their string representation “true” or “false”</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>It is not necessary to change all those values. The default values
are reasonable. “voiceactivation_level” is often the only value that
needs to be adjusted.</p>
</div>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="encoder.html" class="btn btn-neutral float-left" title="Encoder options" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="playback-options.html" class="btn btn-neutral float-right" title="Playback options" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2020, TeamSpeak Systems GmbH.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>