init
This commit is contained in:
9
docs/client_html/ar01s13.html
Normal file
9
docs/client_html/ar01s13.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using playback and capture modes and devices</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="ar01s12.html" title="Logging"><link rel="next" href="ar01s13s02.html" title="Querying available modes and devices"></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">Using playback and capture modes and devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s12.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="ar01s13s02.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="sound"></a>Using playback and capture modes and devices</h2></div></div></div><p>The Client Lib takes care of initializing, using and releasing sound playback and capture devices. Accessing devices is handled by the sound backend shared libraries, found in the soundbackends directory in the SDK. There are different backends available on the supported operating systems: DirectSound and Windows Audio Session API on Windows, Alsa and PulseAudio on Linux, CoreAudio on Mac OS X.</p><p>All strings passed to and from the Client Lib have to be encoded in UTF-8 format.</p><a class="indexterm" name="idm44835434795104"></a><a class="indexterm" name="idm44835434794560"></a><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="initdevice"></a>Initializing modes and devices</h3></div></div></div><p>To initialize a playback and capture device for a TeamSpeak 3 server connection handler, call
|
||||
</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_openPlaybackDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">playbackDevice</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">modeID</var></code>;<br><code>const char* <var class="pdparam">playbackDevice</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434789200"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Connection handler of the server on which you want to initialize the playback device.</p></li><li><p><em class="parameter"><code>modeID</code></em></p><p>The playback mode to use. Valid modes are returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultPlayBackMode</code></a> and <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getPlaybackModeList</code></a>.</p><p>Passing an empty string will use the default playback mode.</p></li><li><p><em class="parameter"><code>playbackDevice</code></em></p><p>Valid parameters are:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>The <em class="parameter"><code>device</code></em> parameter returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultPlaybackDevice</code></a></p></li><li><p>One of the <em class="parameter"><code>device</code></em> parameters returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getPlaybackDeviceList</code></a></p></li><li><p>Empty string to initialize the default playback device.</p></li><li><p>Linux with Alsa only: Custom device name in the form of e.g. “<span class="quote">hw:1,0</span>”.</p></li></ul></div><p>
|
||||
The string needs to be encoded in UTF-8 format.
|
||||
</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>. A likely error is <em class="structfield"><code>ERROR_sound_could_not_open_playback_device</code></em> if the sound backend fails to find a usable playback device.</p><div class="literallayout"><p><br>
|
||||
</p></div><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_openCaptureDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">captureDevice</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">modeID</var></code>;<br><code>const char* <var class="pdparam">captureDevice</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434767264"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Connection handler of the server on which you want to initialize the capture device.</p></li><li><p><em class="parameter"><code>modeID</code></em></p><p>The capture mode to use. Valid modes are returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultCaptureMode</code></a> and <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getCaptureModeList</code></a>.</p><p>Passing an empty string will use the default capture mode.</p></li><li><p><em class="parameter"><code>captureDevice</code></em></p><p>Valid parameters are:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>The <em class="parameter"><code>device</code></em> parameter returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultCaptureDevice</code></a></p></li><li><p>One of the <em class="parameter"><code>device</code></em> parameters returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getCaptureDeviceList</code></a></p></li><li><p>Empty string to initialize the default capture device. Encoded in UTF-8 format.</p></li><li><p>Linux with Alsa only: Custom device name in the form of e.g. “<span class="quote">hw:1,0</span>”.</p></li></ul></div><p>
|
||||
</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>. Likely errors are <em class="structfield"><code>ERROR_sound_could_not_open_capture_device</code></em> if the device fails to open or <em class="structfield"><code>ERROR_sound_handler_has_device</code></em> if the device is already opened. To avoid this problem, it is recommended to close the capture device before opening it again.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s12.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="ar01s13s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Logging<EFBFBD></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>Querying available modes and devices</td></tr></table></div></body></html>
|
||||
Reference in New Issue
Block a user