Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 136c306a350f6a4bd3abd3af7df09a32 > files > 70

jack-audio-connection-kit-devel-1.9.9.5-1.fc17.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Jack2: Creating &amp; manipulating ports</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Jack2
   &#160;<span id="projectnumber">1.9.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Creating &amp; manipulating ports</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3e21d145c3c82d273a889272f0e405e7"><td class="memItemLeft" align="right" valign="top">jack_port_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga3e21d145c3c82d273a889272f0e405e7">jack_port_register</a> (jack_client_t *client, const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga24107cf66d41762b75301881dcaab2fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga24107cf66d41762b75301881dcaab2fa">jack_port_unregister</a> (jack_client_t *client, jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga8d0ea8f44a15d625837a35dd703951bc"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga8d0ea8f44a15d625837a35dd703951bc">jack_port_get_buffer</a> (jack_port_t *port, jack_nframes_t) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga2abf1e9c3fa7d2afae6fd85a6e2ba843"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga2abf1e9c3fa7d2afae6fd85a6e2ba843">jack_port_name</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gaf1554d11abaff29321db1daf1fa614c1"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gaf1554d11abaff29321db1daf1fa614c1">jack_port_short_name</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga2c9ed0ee016e19070b2e42f7f0a12b95"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga2c9ed0ee016e19070b2e42f7f0a12b95">jack_port_flags</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gae2b2ef9ef3ba606be342a7d2c292cb00"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gae2b2ef9ef3ba606be342a7d2c292cb00">jack_port_type</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga443f950e5fe4dd3ba9e1f4530bb172a4"><td class="memItemLeft" align="right" valign="top">jack_port_type_id_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga443f950e5fe4dd3ba9e1f4530bb172a4">jack_port_type_id</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gad013817e162a402399b8755683b43b9d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gad013817e162a402399b8755683b43b9d">jack_port_is_mine</a> (const jack_client_t *client, const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gafa704768d67d1a30f263a9384d845b14"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gafa704768d67d1a30f263a9384d845b14">jack_port_connected</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga996d8f5176b87bb8d333208468b6af12"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga996d8f5176b87bb8d333208468b6af12">jack_port_connected_to</a> (const jack_port_t *port, const char *port_name) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gac1c942d03daee62ac6d0ed0ad044de43"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gac1c942d03daee62ac6d0ed0ad044de43">jack_port_get_connections</a> (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga4e1bd29a68acb4fb45f75931de0d36b2"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga4e1bd29a68acb4fb45f75931de0d36b2">jack_port_get_all_connections</a> (const jack_client_t *client, const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga14afcad849c17bcd6cb739d14899cecf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga14afcad849c17bcd6cb739d14899cecf">jack_port_tie</a> (jack_port_t *src, jack_port_t *dst) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT</td></tr>
<tr class="memitem:gaab2cfe13d90991fbf1d03a2050b93f54"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gaab2cfe13d90991fbf1d03a2050b93f54">jack_port_untie</a> (jack_port_t *port) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT</td></tr>
<tr class="memitem:ga9d335578836fd76d4a922403efaedc5c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga9d335578836fd76d4a922403efaedc5c">jack_port_set_name</a> (jack_port_t *port, const char *port_name) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gae76a201e7a6dfe3af6ee78b99a055117"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gae76a201e7a6dfe3af6ee78b99a055117">jack_port_set_alias</a> (jack_port_t *port, const char *alias) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga51af66966211d2a81a749ab2f689872d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga51af66966211d2a81a749ab2f689872d">jack_port_unset_alias</a> (jack_port_t *port, const char *alias) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga3fcae6e043fdb3ac87b173ff4cbf88d9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga3fcae6e043fdb3ac87b173ff4cbf88d9">jack_port_get_aliases</a> (const jack_port_t *port, char *const aliases[2]) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gab30737dde8a3168a575863de35ed5895"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gab30737dde8a3168a575863de35ed5895">jack_port_request_monitor</a> (jack_port_t *port, int onoff) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga5fd1725d66427287abbec29fbae9214b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga5fd1725d66427287abbec29fbae9214b">jack_port_request_monitor_by_name</a> (jack_client_t *client, const char *port_name, int onoff) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga75f0438ba447ad96ae890c1922e4af0d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga75f0438ba447ad96ae890c1922e4af0d">jack_port_ensure_monitor</a> (jack_port_t *port, int onoff) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga5e52890253590c913913765edf0f9606"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga5e52890253590c913913765edf0f9606">jack_port_monitoring_input</a> (jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga4e1e75b151b88575d12fd86c3b824ba4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga4e1e75b151b88575d12fd86c3b824ba4">jack_connect</a> (jack_client_t *client, const char *source_port, const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga6e3dac6f21115181644c00b9d6743d82"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga6e3dac6f21115181644c00b9d6743d82">jack_disconnect</a> (jack_client_t *client, const char *source_port, const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga3a326e294d87beae4afb7676d7c62ddb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga3a326e294d87beae4afb7676d7c62ddb">jack_port_disconnect</a> (jack_client_t *client, jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:gabaebfd70bedfaecc834ebb02f4546eb1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size</a> (void) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga8acf71c319f50c5789f7454e4b6ef2e5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga8acf71c319f50c5789f7454e4b6ef2e5">jack_port_type_size</a> (void) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr class="memitem:ga52a65a0dd00695ecf75e23f1bd48f96a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PortFunctions.html#ga52a65a0dd00695ecf75e23f1bd48f96a">jack_port_type_get_buffer_size</a> (jack_client_t *client, const char *port_type) JACK_WEAK_EXPORT</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga3e21d145c3c82d273a889272f0e405e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">jack_port_t* jack_port_register </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>buffer_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a new port for the client. This is an object used for moving data of any type in or out of the client. Ports may be connected in various ways.</p>
<p>Each port has a short name. The port's full name contains the name of the client concatenated with a colon (:) followed by its short name. The <a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a> is the maximum length of this full name. Exceeding that will cause the port registration to fail and return NULL.</p>
<p>The <em>port_name</em> must be unique among all ports owned by this client. If the name is not unique, the registration will fail.</p>
<p>All ports have a type, which may be any non-NULL and non-zero length string, passed as an argument. Some port types are built into the JACK API, currently only JACK_DEFAULT_AUDIO_TYPE.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>pointer to JACK client structure. </td></tr>
    <tr><td class="paramname">port_name</td><td>non-empty short name for the new port (not including the leading <em>"client_name:"</em>). Must be unique. </td></tr>
    <tr><td class="paramname">port_type</td><td>port type name. If longer than <a class="el" href="group__PortFunctions.html#ga8acf71c319f50c5789f7454e4b6ef2e5">jack_port_type_size()</a>, only that many characters are significant. </td></tr>
    <tr><td class="paramname">flags</td><td>JackPortFlags bit mask. </td></tr>
    <tr><td class="paramname">buffer_size</td><td>must be non-zero if this is not a built-in <em>port_type</em>. Otherwise, it is ignored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>jack_port_t pointer on success, otherwise NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="ga24107cf66d41762b75301881dcaab2fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_unregister </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove the port from the client, disconnecting any existing connections.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code </dd></dl>

</div>
</div>
<a class="anchor" id="ga8d0ea8f44a15d625837a35dd703951bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* jack_port_get_buffer </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jack_nframes_t&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This returns a pointer to the memory area associated with the specified port. For an output port, it will be a memory area that can be written to; for an input port, it will be an area containing the data from the port's connection(s), or zero-filled. if there are multiple inbound connections, the data will be mixed appropriately.</p>
<h2>FOR OUTPUT PORTS ONLY : DEPRECATED in Jack 2.0 !!</h2>
<p>You may cache the value returned, but only between calls to your "blocksize" callback. For this reason alone, you should either never cache the return value or ensure you have a "blocksize" callback and be sure to invalidate the cached address from there.</p>
<p>Caching output ports is DEPRECATED in Jack 2.0, due to some new optimization (like "pipelining"). Port buffers have to be retrieved in each callback for proper functionning. </p>

</div>
</div>
<a class="anchor" id="ga2abf1e9c3fa7d2afae6fd85a6e2ba843"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* jack_port_name </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the full name of the jack_port_t (including the <em>"client_name:"</em> prefix).</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf1554d11abaff29321db1daf1fa614c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* jack_port_short_name </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the short name of the jack_port_t (not including the <em>"client_name:"</em> prefix).</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2c9ed0ee016e19070b2e42f7f0a12b95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_flags </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the JackPortFlags of the jack_port_t. </dd></dl>

</div>
</div>
<a class="anchor" id="gae2b2ef9ef3ba606be342a7d2c292cb00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* jack_port_type </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the <em>port</em> type, at most <a class="el" href="group__PortFunctions.html#ga8acf71c319f50c5789f7454e4b6ef2e5">jack_port_type_size()</a> characters including a final NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="ga443f950e5fe4dd3ba9e1f4530bb172a4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">jack_port_type_id_t jack_port_type_id </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the <em>port</em> type id. </dd></dl>

</div>
</div>
<a class="anchor" id="gad013817e162a402399b8755683b43b9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_is_mine </td>
          <td>(</td>
          <td class="paramtype">const jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>TRUE if the jack_port_t belongs to the jack_client_t. </dd></dl>

</div>
</div>
<a class="anchor" id="gafa704768d67d1a30f263a9384d845b14"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_connected </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>number of connections to or from <em>port</em>.</dd></dl>
<dl class="section pre"><dt>Precondition:</dt><dd>The calling client must own <em>port</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga996d8f5176b87bb8d333208468b6af12"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_connected_to </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>TRUE if the locally-owned <em>port</em> is <b>directly</b> connected to the <em>port_name</em>.</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac1c942d03daee62ac6d0ed0ad044de43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char** jack_port_get_connections </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>a null-terminated array of full port names to which the <em>port</em> is connected. If none, returns NULL.</dd></dl>
<p>The caller is responsible for calling jack_free() on any non-NULL returned value.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>locally owned jack_port_t pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a>, <a class="el" href="group__PortFunctions.html#ga4e1bd29a68acb4fb45f75931de0d36b2">jack_port_get_all_connections()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4e1bd29a68acb4fb45f75931de0d36b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char** jack_port_get_all_connections </td>
          <td>(</td>
          <td class="paramtype">const jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>a null-terminated array of full port names to which the <em>port</em> is connected. If none, returns NULL.</dd></dl>
<p>The caller is responsible for calling jack_free() on any non-NULL returned value.</p>
<p>This differs from <a class="el" href="group__PortFunctions.html#gac1c942d03daee62ac6d0ed0ad044de43">jack_port_get_connections()</a> in two important respects: </p>
<pre class="fragment">1) You may not call this function from code that is
     executed in response to a JACK event. For example,
     you cannot use it in a GraphReordered handler.

2) You need not be the owner of the port to get information
     about its connections.
</pre><dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga14afcad849c17bcd6cb739d14899cecf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_tie </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>This function will be removed from a future version of JACK. Do not use it. There is no replacement. It has turned out to serve essentially no purpose in real-life JACK clients. </dd></dl>

</div>
</div>
<a class="anchor" id="gaab2cfe13d90991fbf1d03a2050b93f54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_untie </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>This function will be removed from a future version of JACK. Do not use it. There is no replacement. It has turned out to serve essentially no purpose in real-life JACK clients. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9d335578836fd76d4a922403efaedc5c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_set_name </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Modify a port's short name. May be called at any time. If the resulting full name (including the <em>"client_name:"</em> prefix) is longer than <a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a>, it will be truncated.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>

</div>
</div>
<a class="anchor" id="gae76a201e7a6dfe3af6ee78b99a055117"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_set_alias </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>alias</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set <em>alias</em> as an alias for <em>port</em>. May be called at any time. If the alias is longer than <a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a>, it will be truncated.</p>
<p>After a successful call, and until JACK exits or  <a class="el" href="group__PortFunctions.html#ga51af66966211d2a81a749ab2f689872d">jack_port_unset_alias()</a> is called,  may be used as a alternate name for the port.</p>
<p>Ports can have up to two aliases - if both are already set, this function will return an error.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>

</div>
</div>
<a class="anchor" id="ga51af66966211d2a81a749ab2f689872d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_unset_alias </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>alias</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove <em>alias</em> as an alias for <em>port</em>. May be called at any time.</p>
<p>After a successful call, <em>alias</em> can no longer be used as a alternate name for the port.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3fcae6e043fdb3ac87b173ff4cbf88d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_get_aliases </td>
          <td>(</td>
          <td class="paramtype">const jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *const&#160;</td>
          <td class="paramname"><em>aliases</em>[2]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get any aliases known for .</p>
<dl class="section return"><dt>Returns:</dt><dd>the number of aliases discovered for the port </dd></dl>

</div>
</div>
<a class="anchor" id="gab30737dde8a3168a575863de35ed5895"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_request_monitor </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>onoff</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If JackPortCanMonitor is set for this <em>port</em>, turn input monitoring on or off. Otherwise, do nothing. </p>

</div>
</div>
<a class="anchor" id="ga5fd1725d66427287abbec29fbae9214b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_request_monitor_by_name </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>onoff</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If JackPortCanMonitor is set for this <em>port_name</em>, turn input monitoring on or off. Otherwise, do nothing.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code.</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__PortFunctions.html#gabaebfd70bedfaecc834ebb02f4546eb1">jack_port_name_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga75f0438ba447ad96ae890c1922e4af0d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_ensure_monitor </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>onoff</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If JackPortCanMonitor is set for a port, this function turns on input monitoring if it was off, and turns it off if only one request has been made to turn it on. Otherwise it does nothing.</p>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code </dd></dl>

</div>
</div>
<a class="anchor" id="ga5e52890253590c913913765edf0f9606"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_monitoring_input </td>
          <td>(</td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>TRUE if input monitoring has been requested for <em>port</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4e1e75b151b88575d12fd86c3b824ba4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_connect </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source_port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>destination_port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Establish a connection between two ports.</p>
<p>When a connection exists, data written to the source port will be available to be read at the destination port.</p>
<dl class="section pre"><dt>Precondition:</dt><dd>The port types must be identical.</dd>
<dd>
The JackPortFlags of the <em>source_port</em> must include JackPortIsOutput.</dd>
<dd>
The JackPortFlags of the <em>destination_port</em> must include JackPortIsInput.</dd></dl>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, EEXIST if the connection is already made, otherwise a non-zero error code </dd></dl>

</div>
</div>
<a class="anchor" id="ga6e3dac6f21115181644c00b9d6743d82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_disconnect </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source_port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>destination_port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a connection between two ports.</p>
<dl class="section pre"><dt>Precondition:</dt><dd>The port types must be identical.</dd>
<dd>
The JackPortFlags of the <em>source_port</em> must include JackPortIsOutput.</dd>
<dd>
The JackPortFlags of the <em>destination_port</em> must include JackPortIsInput.</dd></dl>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, otherwise a non-zero error code </dd></dl>

</div>
</div>
<a class="anchor" id="ga3a326e294d87beae4afb7676d7c62ddb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_disconnect </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jack_port_t *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Perform the same function as <a class="el" href="group__PortFunctions.html#ga6e3dac6f21115181644c00b9d6743d82">jack_disconnect()</a> using port handles rather than names. This avoids the name lookup inherent in the name-based version.</p>
<p>Clients connecting their own ports are likely to use this function, while generic connection clients (e.g. patchbays) would use <a class="el" href="group__PortFunctions.html#ga6e3dac6f21115181644c00b9d6743d82">jack_disconnect()</a>. </p>

</div>
</div>
<a class="anchor" id="gabaebfd70bedfaecc834ebb02f4546eb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_name_size </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the maximum number of characters in a full JACK port name including the final NULL character. This value is a constant.</dd></dl>
<p>A port's full name contains the owning client name concatenated with a colon (:) followed by its short name and a NULL character. </p>

</div>
</div>
<a class="anchor" id="ga8acf71c319f50c5789f7454e4b6ef2e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jack_port_type_size </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the maximum number of characters in a JACK port type name including the final NULL character. This value is a constant. </dd></dl>

</div>
</div>
<a class="anchor" id="ga52a65a0dd00695ecf75e23f1bd48f96a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t jack_port_type_get_buffer_size </td>
          <td>(</td>
          <td class="paramtype">jack_client_t *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port_type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns:</dt><dd>the buffersize of a port of type <ul>
<li>port_type.</li>
</ul>
this function may only be called in a buffer_size callback. </dd></dl>

</div>
</div>
</div><!-- contents -->
<hr size="1"><address style="text-align: right;"><small>
Generated for Jack2 by <a href="http://www.doxygen.org/
index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
1.8.1.1</small></address>
</body>
</html>