Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > main-testing > by-pkgid > 187676b5433787923dfa2cdd6900c6cd > files > 153

lib64pulseaudio-devel-0.9.15-2.0.7mdv2009.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PulseAudio: stream.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>stream.h File Reference</h1>Audio streams for input, output and sample upload.  
<a href="#_details">More...</a>
<p>

<p>
<a href="stream_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An opaque stream for playback or recording.  <a href="#960d798980692a2ff01e5a70553d4f29"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> )(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, int success, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A generic callback for operation completion.  <a href="#4db8260c2273ec4ddd51e0ff9fa198b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a> )(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, size_t bytes, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A generic request callback.  <a href="#2aebb54acebd28841fe72df24e9a5c76"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> )(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A generic notification callback.  <a href="#d2adcc8f27af8241005f3388e7081ccc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#56d668892312b7e651cdf737336710e6">pa_stream_event_cb_t</a> )(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, const char *name, <a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *pl, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A callback for asynchronous meta/policy event messages.  <a href="#56d668892312b7e651cdf737336710e6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#b95a64207d12a1da61d31289d8b3ff3f">pa_stream_new</a> (<a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a> *c, const char *name, const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a> *ss, const <a class="el" href="structpa__channel__map.html">pa_channel_map</a> *map)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new, unconnected stream with the specified name and sample type.  <a href="#b95a64207d12a1da61d31289d8b3ff3f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#5bd70e309f09679753499fa198713672">pa_stream_new_with_proplist</a> (<a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a> *c, const char *name, const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a> *ss, const <a class="el" href="structpa__channel__map.html">pa_channel_map</a> *map, <a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new, unconnected stream with the specified name and sample type, and specify the the initial stream property list.  <a href="#5bd70e309f09679753499fa198713672"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#7780fa5438f31152b0a6aeae31b63264">pa_stream_unref</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decrease the reference counter by one.  <a href="#7780fa5438f31152b0a6aeae31b63264"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#5564dc25593af14ede2ee855e198467a">pa_stream_ref</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increase the reference counter by one.  <a href="#5564dc25593af14ede2ee855e198467a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="def_8h.html#112cf6dbe9ac5554fddc8da251797477">pa_stream_state_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#b1da38d494d6485e35f0715f40dff0ab">pa_stream_get_state</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current state of the stream.  <a href="#b1da38d494d6485e35f0715f40dff0ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#d995ede5ff0edefe068b6c7e53940e90">pa_stream_get_context</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the context this stream is attached to.  <a href="#d995ede5ff0edefe068b6c7e53940e90"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#a364d8b06db3fef32d2aa0d588f92706">pa_stream_get_index</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the sink input resp.  <a href="#a364d8b06db3fef32d2aa0d588f92706"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#a84f1dc4657cd2e2f52effffd4583963">pa_stream_get_device_index</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the index of the sink or source this stream is connected to in the server.  <a href="#a84f1dc4657cd2e2f52effffd4583963"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#df568b636afbd00ff60e0c100595309e">pa_stream_get_device_name</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the sink or source this stream is connected to in the server.  <a href="#df568b636afbd00ff60e0c100595309e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#aa4234efbfc42b102edfc3f97789d257">pa_stream_is_suspended</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return 1 if the sink or source this stream is connected to has been suspended.  <a href="#aa4234efbfc42b102edfc3f97789d257"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#e3247516f8c8a14e158cd20ab205d678">pa_stream_is_corked</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return 1 if the this stream has been corked.  <a href="#e3247516f8c8a14e158cd20ab205d678"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#e13072bc6107aa050f2ff4d50dd49640">pa_stream_connect_playback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, const char *dev, const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *attr, <a class="el" href="def_8h.html#9328c83d983878efb0627b99d949a3cc">pa_stream_flags_t</a> flags, <a class="el" href="structpa__cvolume.html">pa_cvolume</a> *volume, <a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *sync_stream)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect the stream to a sink.  <a href="#e13072bc6107aa050f2ff4d50dd49640"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#bfd34293aae8f170f572d1093c1bcdf9">pa_stream_connect_record</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, const char *dev, const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *attr, <a class="el" href="def_8h.html#9328c83d983878efb0627b99d949a3cc">pa_stream_flags_t</a> flags)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect the stream to a source.  <a href="#bfd34293aae8f170f572d1093c1bcdf9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#a4e0c83264f3935911e6b30e6f8ef2b1">pa_stream_disconnect</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disconnect a stream from a source/sink.  <a href="#a4e0c83264f3935911e6b30e6f8ef2b1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#4fc69dec0cc202fcc174125dc88dada7">pa_stream_write</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, const void *data, size_t nbytes, <a class="el" href="def_8h.html#85c8c3063d8218304c041cb9f83ec431">pa_free_cb_t</a> free_cb, int64_t offset, <a class="el" href="def_8h.html#3bd011cdb61caf568b544715b1b89def">pa_seek_mode_t</a> seek)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write some data to the server (for playback sinks), if free_cb is non-NULL this routine is called when all data has been written out and an internal reference to the specified data is kept, the data is not copied.  <a href="#4fc69dec0cc202fcc174125dc88dada7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#c2838c449cde56e169224d7fe3d00824">pa_stream_peek</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, const void **data, size_t *nbytes)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the next fragment from the buffer (for recording).  <a href="#c2838c449cde56e169224d7fe3d00824"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#2e8a3e15fb63a5bb9cbba2d01a6538a5">pa_stream_drop</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove the current fragment on record streams.  <a href="#2e8a3e15fb63a5bb9cbba2d01a6538a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#b63ccd1908b6deae1b2ca7be6fa759e7">pa_stream_writable_size</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of bytes that may be written using <a class="el" href="stream_8h.html#4fc69dec0cc202fcc174125dc88dada7" title="Write some data to the server (for playback sinks), if free_cb is non-NULL this routine...">pa_stream_write()</a>.  <a href="#b63ccd1908b6deae1b2ca7be6fa759e7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#a2e5ff19aa36b90471c34badbdfdf345">pa_stream_readable_size</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of bytes that may be read using <a class="el" href="stream_8h.html#c2838c449cde56e169224d7fe3d00824" title="Read the next fragment from the buffer (for recording).">pa_stream_peek()</a>.  <a href="#a2e5ff19aa36b90471c34badbdfdf345"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#8d263f188073f244b3820f3f50db4ba5">pa_stream_drain</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Drain a playback stream.  <a href="#8d263f188073f244b3820f3f50db4ba5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#c8300aa5136a223b14a5384f44564284">pa_stream_update_timing_info</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a timing info structure update for a stream.  <a href="#c8300aa5136a223b14a5384f44564284"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#295da6cbb032850600598d59fed2cc18">pa_stream_set_state_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenever the state of the stream changes.  <a href="#295da6cbb032850600598d59fed2cc18"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#2dcc985c65964da290a0c2e1bf103175">pa_stream_set_write_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called when new data may be written to the stream.  <a href="#2dcc985c65964da290a0c2e1bf103175"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#b9949b66e1aca2c1988f864e90f2ae4c">pa_stream_set_read_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called when new data is available from the stream.  <a href="#b9949b66e1aca2c1988f864e90f2ae4c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#f1e07bc89d12aca66d2725a60cfdbdc3">pa_stream_set_overflow_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called when a buffer overflow happens.  <a href="#f1e07bc89d12aca66d2725a60cfdbdc3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#660b5a7096409f41ef52b8e0b7e96d38">pa_stream_set_underflow_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called when a buffer underflow happens.  <a href="#660b5a7096409f41ef52b8e0b7e96d38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#aa10d78431d934b07c690bc916f3daa7">pa_stream_set_started_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called when a the server starts playback after an underrun or on initial startup.  <a href="#aa10d78431d934b07c690bc916f3daa7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#9e42c196273746ac523353a1dc5068dc">pa_stream_set_latency_update_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenever a latency information update happens.  <a href="#9e42c196273746ac523353a1dc5068dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#6def5afeb0b2071f130bb373b3f114b8">pa_stream_set_moved_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenever the stream is moved to a different sink/source.  <a href="#6def5afeb0b2071f130bb373b3f114b8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#4ddaac3d3a921829c3080e7c8c15a21e">pa_stream_set_suspended_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenever the sink/source this stream is connected to is suspended or resumed.  <a href="#4ddaac3d3a921829c3080e7c8c15a21e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#5690ed098466233860e632abfa61fe50">pa_stream_set_event_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#56d668892312b7e651cdf737336710e6">pa_stream_event_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenver a meta/policy control event is received.  <a href="#5690ed098466233860e632abfa61fe50"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#6a3d521e76540896442ef09cd12e3e2b">pa_stream_set_buffer_attr_callback</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function that is called whenver the buffer attributes on the server side change.  <a href="#6a3d521e76540896442ef09cd12e3e2b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#14e698233ac2d246646651955ab0ec7b">pa_stream_cork</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, int b, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pause (or resume) playback of this stream temporarily.  <a href="#14e698233ac2d246646651955ab0ec7b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#c9c524eb275d258b00c553409682409c">pa_stream_flush</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush the playback buffer of this stream.  <a href="#c9c524eb275d258b00c553409682409c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#628650e49917cc9459a4a601a7f2a6fc">pa_stream_prebuf</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reenable prebuffering as specified in the <a class="el" href="structpa__buffer__attr.html" title="Playback and record buffer metrics.">pa_buffer_attr</a> structure.  <a href="#628650e49917cc9459a4a601a7f2a6fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#e17a3a9f6ee0403c4665f6f4ce02ca3c">pa_stream_trigger</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request immediate start of playback on this stream.  <a href="#e17a3a9f6ee0403c4665f6f4ce02ca3c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#ac0f980de4097a4a815bcf143df68338">pa_stream_set_name</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, const char *name, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rename the stream.  <a href="#ac0f980de4097a4a815bcf143df68338"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#9b1caba84c7a5c90efdbcaed31e9dfca">pa_stream_get_time</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89">pa_usec_t</a> *r_usec)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current playback/recording time.  <a href="#9b1caba84c7a5c90efdbcaed31e9dfca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#a521efcc16fe2abf0f8461462432ac16">pa_stream_get_latency</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89">pa_usec_t</a> *r_usec, int *negative)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the total stream latency.  <a href="#a521efcc16fe2abf0f8461462432ac16"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structpa__timing__info.html">pa_timing_info</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb">pa_stream_get_timing_info</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the latest raw timing data structure.  <a href="#090147751441a97e04a4acef1d6514cb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#274d745a41dc54cc6f946bed7bcd8a58">pa_stream_get_sample_spec</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a pointer to the stream's sample specification.  <a href="#274d745a41dc54cc6f946bed7bcd8a58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structpa__channel__map.html">pa_channel_map</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#c4c92d45a14a876f187ff7bd8090826a">pa_stream_get_channel_map</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a pointer to the stream's channel map.  <a href="#c4c92d45a14a876f187ff7bd8090826a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#9a3c3e78eafb28cce3a16cef2b68a385">pa_stream_get_buffer_attr</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the per-stream server-side buffer metrics of the stream.  <a href="#9a3c3e78eafb28cce3a16cef2b68a385"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#f662224125a43b3e8ae25b3d3684c111">pa_stream_set_buffer_attr</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *attr, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the buffer metrics of the stream during playback.  <a href="#f662224125a43b3e8ae25b3d3684c111"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#753f1475073632fd76c0e86699deea6b">pa_stream_update_sample_rate</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, uint32_t rate, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the stream sampling rate during playback.  <a href="#753f1475073632fd76c0e86699deea6b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#5fe6f3fa88f06a6d2f7df23086dfcd19">pa_stream_proplist_update</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, <a class="el" href="proplist_8h.html#4b73cd513add16a26378a7941a9f1fd9">pa_update_mode_t</a> mode, <a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *p, <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the property list of the sink input/source output of this stream, adding new entries.  <a href="#5fe6f3fa88f06a6d2f7df23086dfcd19"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#c113b1f9311a73b27dd894421deb4181">pa_stream_proplist_remove</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, const char *const keys[], <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a> cb, void *userdata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the property list of the sink input/source output of this stream, remove entries.  <a href="#c113b1f9311a73b27dd894421deb4181"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#2d4b414edaa95ed08ed7e3b321a208d0">pa_stream_set_monitor_stream</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, uint32_t sink_input_idx)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For record streams connected to a monitor source: monitor only a very specific sink input of the sink.  <a href="#2d4b414edaa95ed08ed7e3b321a208d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream_8h.html#d2526ff6c1eccea5ac7fda85aa7aa258">pa_stream_get_monitor_stream</a> (<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return what has been set with <a class="el" href="stream_8h.html#2d4b414edaa95ed08ed7e3b321a208d0" title="For record streams connected to a monitor source: monitor only a very specific sink...">pa_stream_set_monitor_stream()</a> ebfore.  <a href="#d2526ff6c1eccea5ac7fda85aa7aa258"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Audio streams for input, output and sample upload. 
<p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="960d798980692a2ff01e5a70553d4f29"></a><!-- doxytag: member="stream.h::pa_stream" ref="960d798980692a2ff01e5a70553d4f29" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> <a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An opaque stream for playback or recording. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a1">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a1">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="56d668892312b7e651cdf737336710e6"></a><!-- doxytag: member="stream.h::pa_stream_event_cb_t" ref="56d668892312b7e651cdf737336710e6" args=")(pa_stream *p, const char *name, pa_proplist *pl, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="stream_8h.html#56d668892312b7e651cdf737336710e6">pa_stream_event_cb_t</a>)(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, const char *name, <a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *pl, void *userdata)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A callback for asynchronous meta/policy event messages. 
<p>
Well known event names are PA_STREAM_EVENT_REQUEST_CORK and PA_STREAM_EVENT_REQUEST_UNCORK. The set of defined events can be extended at any time. Also, server modules may introduce additional message types so make sure that your callback function ignores messages it doesn't know. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.15 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d2adcc8f27af8241005f3388e7081ccc"></a><!-- doxytag: member="stream.h::pa_stream_notify_cb_t" ref="d2adcc8f27af8241005f3388e7081ccc" args=")(pa_stream *p, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>)(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, void *userdata)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A generic notification callback. 
<p>

</div>
</div><p>
<a class="anchor" name="2aebb54acebd28841fe72df24e9a5c76"></a><!-- doxytag: member="stream.h::pa_stream_request_cb_t" ref="2aebb54acebd28841fe72df24e9a5c76" args=")(pa_stream *p, size_t bytes, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a>)(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *p, size_t bytes, void *userdata)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A generic request callback. 
<p>

</div>
</div><p>
<a class="anchor" name="4db8260c2273ec4ddd51e0ff9fa198b0"></a><!-- doxytag: member="stream.h::pa_stream_success_cb_t" ref="4db8260c2273ec4ddd51e0ff9fa198b0" args=")(pa_stream *s, int success, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>)(<a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *s, int success, void *userdata)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A generic callback for operation completion. 
<p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="e13072bc6107aa050f2ff4d50dd49640"></a><!-- doxytag: member="stream.h::pa_stream_connect_playback" ref="e13072bc6107aa050f2ff4d50dd49640" args="(pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_connect_playback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="def_8h.html#9328c83d983878efb0627b99d949a3cc">pa_stream_flags_t</a>&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpa__cvolume.html">pa_cvolume</a> *&nbsp;</td>
          <td class="paramname"> <em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>sync_stream</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Connect the stream to a sink. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The stream to connect to a sink </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>Name of the sink to connect to, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>attr</em>&nbsp;</td><td>Buffering attributes, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Additional flags, or 0 for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>volume</em>&nbsp;</td><td>Initial volume, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sync_stream</em>&nbsp;</td><td>Synchronize this stream with the specified one, or NULL for a standalone stream </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a65">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a37">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="bfd34293aae8f170f572d1093c1bcdf9"></a><!-- doxytag: member="stream.h::pa_stream_connect_record" ref="bfd34293aae8f170f572d1093c1bcdf9" args="(pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_connect_record           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="def_8h.html#9328c83d983878efb0627b99d949a3cc">pa_stream_flags_t</a>&nbsp;</td>
          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Connect the stream to a source. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The stream to connect to a source </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>Name of the source to connect to, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>attr</em>&nbsp;</td><td>Buffer attributes, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Additional flags, or 0 for default </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a68">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="14e698233ac2d246646651955ab0ec7b"></a><!-- doxytag: member="stream.h::pa_stream_cork" ref="14e698233ac2d246646651955ab0ec7b" args="(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_cork           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pause (or resume) playback of this stream temporarily. 
<p>
Available on both playback and recording streams. If b is 1 the stream is paused. If b is 0 the stream is resumed. The pause/resume operation is executed as quickly as possible. If a cork is very quickly followed by an uncork or the other way round this might not actually have any effect on the stream that is output. You can use <a class="el" href="stream_8h.html#e3247516f8c8a14e158cd20ab205d678" title="Return 1 if the this stream has been corked.">pa_stream_is_corked()</a> to find out whether the stream is currently paused or not. Normally a stream will be created in uncorked state. If you pass PA_STREAM_START_CORKED as flag during connection of the stream it will be created in corked state. 
</div>
</div><p>
<a class="anchor" name="a4e0c83264f3935911e6b30e6f8ef2b1"></a><!-- doxytag: member="stream.h::pa_stream_disconnect" ref="a4e0c83264f3935911e6b30e6f8ef2b1" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_disconnect           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Disconnect a stream from a source/sink. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a72">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a12">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="8d263f188073f244b3820f3f50db4ba5"></a><!-- doxytag: member="stream.h::pa_stream_drain" ref="8d263f188073f244b3820f3f50db4ba5" args="(pa_stream *s, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_drain           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Drain a playback stream. 
<p>
Use this for notification when the buffer is empty <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a79">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a21">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="2e8a3e15fb63a5bb9cbba2d01a6538a5"></a><!-- doxytag: member="stream.h::pa_stream_drop" ref="2e8a3e15fb63a5bb9cbba2d01a6538a5" args="(pa_stream *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_drop           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove the current fragment on record streams. 
<p>
It is invalid to do this without first calling <a class="el" href="stream_8h.html#c2838c449cde56e169224d7fe3d00824" title="Read the next fragment from the buffer (for recording).">pa_stream_peek()</a>. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a22">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="c9c524eb275d258b00c553409682409c"></a><!-- doxytag: member="stream.h::pa_stream_flush" ref="c9c524eb275d258b00c553409682409c" args="(pa_stream *s, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_flush           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Flush the playback buffer of this stream. 
<p>
Most of the time you're better off using the parameter delta of <a class="el" href="stream_8h.html#4fc69dec0cc202fcc174125dc88dada7" title="Write some data to the server (for playback sinks), if free_cb is non-NULL this routine...">pa_stream_write()</a> instead of this function. Available on both playback and recording streams. 
</div>
</div><p>
<a class="anchor" name="9a3c3e78eafb28cce3a16cef2b68a385"></a><!-- doxytag: member="stream.h::pa_stream_get_buffer_attr" ref="9a3c3e78eafb28cce3a16cef2b68a385" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a>* pa_stream_get_buffer_attr           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the per-stream server-side buffer metrics of the stream. 
<p>
Only valid after the stream has been connected successfuly and if the server is at least PulseAudio 0.9. This will return the actual configured buffering metrics, which may differ from what was requested during <a class="el" href="stream_8h.html#bfd34293aae8f170f572d1093c1bcdf9" title="Connect the stream to a source.">pa_stream_connect_record()</a> or <a class="el" href="stream_8h.html#e13072bc6107aa050f2ff4d50dd49640" title="Connect the stream to a sink.">pa_stream_connect_playback()</a>. This call will always return the actually per-stream server-side buffer metrics, regardless whether PA_STREAM_ADJUST_LATENCY is set or not. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.0 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a30">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="c4c92d45a14a876f187ff7bd8090826a"></a><!-- doxytag: member="stream.h::pa_stream_get_channel_map" ref="c4c92d45a14a876f187ff7bd8090826a" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structpa__channel__map.html">pa_channel_map</a>* pa_stream_get_channel_map           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a pointer to the stream's channel map. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a40">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="d995ede5ff0edefe068b6c7e53940e90"></a><!-- doxytag: member="stream.h::pa_stream_get_context" ref="d995ede5ff0edefe068b6c7e53940e90" args="(pa_stream *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a>* pa_stream_get_context           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the context this stream is attached to. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a31">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a27">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="a84f1dc4657cd2e2f52effffd4583963"></a><!-- doxytag: member="stream.h::pa_stream_get_device_index" ref="a84f1dc4657cd2e2f52effffd4583963" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t pa_stream_get_device_index           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the index of the sink or source this stream is connected to in the server. 
<p>
This is useful for usage with the introspection functions, such as <a class="el" href="introspect_8h.html#e886cd4bdc06fa98a61d15f818c33c9f" title="Get information about a sink by its index.">pa_context_get_sink_info_by_index()</a> resp. <a class="el" href="introspect_8h.html#55f2fbae1ce6b964e65c82c848280c06" title="Get information about a source by its index.">pa_context_get_source_info_by_index()</a>. Please note that streams may be moved between sinks/sources and thus it is recommended to use <a class="el" href="stream_8h.html#6def5afeb0b2071f130bb373b3f114b8" title="Set the callback function that is called whenever the stream is moved to a different...">pa_stream_set_moved_callback()</a> to be notified about this. This function will return with PA_ERR_NOTSUPPORTED when the server is older than 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a42">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="df568b636afbd00ff60e0c100595309e"></a><!-- doxytag: member="stream.h::pa_stream_get_device_name" ref="df568b636afbd00ff60e0c100595309e" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* pa_stream_get_device_name           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the name of the sink or source this stream is connected to in the server. 
<p>
This is useful for usage with the introspection functions, such as <a class="el" href="introspect_8h.html#446ffde2b8adea89940adcba40be319c" title="Get information about a sink by its name.">pa_context_get_sink_info_by_name()</a> resp. <a class="el" href="introspect_8h.html#3904ba3fc9d83355cb84aab0d1cd3e91" title="Get information about a source by its name.">pa_context_get_source_info_by_name()</a>. Please note that streams may be moved between sinks/sources and thus it is recommended to use <a class="el" href="stream_8h.html#6def5afeb0b2071f130bb373b3f114b8" title="Set the callback function that is called whenever the stream is moved to a different...">pa_stream_set_moved_callback()</a> to be notified about this. This function will return with PA_ERR_NOTSUPPORTED when the server is older than 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a41">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="a364d8b06db3fef32d2aa0d588f92706"></a><!-- doxytag: member="stream.h::pa_stream_get_index" ref="a364d8b06db3fef32d2aa0d588f92706" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t pa_stream_get_index           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the sink input resp. 
<p>
source output index this stream is identified in the server with. This is useful for usage with the introspection functions, such as <a class="el" href="introspect_8h.html#eca4a368510f46dac4313f498583e340" title="Get some information about a sink input by its index.">pa_context_get_sink_input_info()</a> resp. <a class="el" href="introspect_8h.html#e14eaf111465ea7c8aa2a9b746832b19" title="Get information about a source output by its index.">pa_context_get_source_output_info()</a>. 
</div>
</div><p>
<a class="anchor" name="a521efcc16fe2abf0f8461462432ac16"></a><!-- doxytag: member="stream.h::pa_stream_get_latency" ref="a521efcc16fe2abf0f8461462432ac16" args="(pa_stream *s, pa_usec_t *r_usec, int *negative)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_get_latency           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89">pa_usec_t</a> *&nbsp;</td>
          <td class="paramname"> <em>r_usec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>negative</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the total stream latency. 
<p>
This function is based on <a class="el" href="stream_8h.html#9b1caba84c7a5c90efdbcaed31e9dfca" title="Return the current playback/recording time.">pa_stream_get_time()</a>.<p>
In case the stream is a monitoring stream the result can be negative, i.e. the captured samples are not yet played. In this case *negative is set to 1.<p>
If no timing information has been recieved yet this call will return PA_ERR_NODATA. For more details see <a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb" title="Return the latest raw timing data structure.">pa_stream_get_timing_info()</a> and <a class="el" href="stream_8h.html#9b1caba84c7a5c90efdbcaed31e9dfca" title="Return the current playback/recording time.">pa_stream_get_time()</a>. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a85">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="d2526ff6c1eccea5ac7fda85aa7aa258"></a><!-- doxytag: member="stream.h::pa_stream_get_monitor_stream" ref="d2526ff6c1eccea5ac7fda85aa7aa258" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t pa_stream_get_monitor_stream           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return what has been set with <a class="el" href="stream_8h.html#2d4b414edaa95ed08ed7e3b321a208d0" title="For record streams connected to a monitor source: monitor only a very specific sink...">pa_stream_set_monitor_stream()</a> ebfore. 
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>

</div>
</div><p>
<a class="anchor" name="274d745a41dc54cc6f946bed7bcd8a58"></a><!-- doxytag: member="stream.h::pa_stream_get_sample_spec" ref="274d745a41dc54cc6f946bed7bcd8a58" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a>* pa_stream_get_sample_spec           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a pointer to the stream's sample specification. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a38">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="b1da38d494d6485e35f0715f40dff0ab"></a><!-- doxytag: member="stream.h::pa_stream_get_state" ref="b1da38d494d6485e35f0715f40dff0ab" args="(pa_stream *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="def_8h.html#112cf6dbe9ac5554fddc8da251797477">pa_stream_state_t</a> pa_stream_get_state           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current state of the stream. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a23">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a22">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="9b1caba84c7a5c90efdbcaed31e9dfca"></a><!-- doxytag: member="stream.h::pa_stream_get_time" ref="9b1caba84c7a5c90efdbcaed31e9dfca" args="(pa_stream *s, pa_usec_t *r_usec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_get_time           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sample_8h.html#885df3b973773f0dccbbec6bc6777f89">pa_usec_t</a> *&nbsp;</td>
          <td class="paramname"> <em>r_usec</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current playback/recording time. 
<p>
This is based on the data in the timing info structure returned by <a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb" title="Return the latest raw timing data structure.">pa_stream_get_timing_info()</a>.<p>
This function will usually only return new data if a timing info update has been recieved. Only if timing interpolation has been requested (PA_STREAM_INTERPOLATE_TIMING) the data from the last timing update is used for an estimation of the current playback/recording time based on the local time that passed since the timing info structure has been acquired.<p>
The time value returned by this function is guaranteed to increase monotonically. (that means: the returned value is always greater or equal to the value returned on the last call). This behaviour can be disabled by using PA_STREAM_NOT_MONOTONIC. This may be desirable to deal better with bad estimations of transport latencies, but may have strange effects if the application is not able to deal with time going 'backwards'.<p>
The time interpolator activated by PA_STREAM_INTERPOLATE_TIMING favours 'smooth' time graphs over accurate ones to improve the smoothness of UI operations that are tied to the audio clock. If accuracy is more important to you you might need to estimate your timing based on the data from <a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb" title="Return the latest raw timing data structure.">pa_stream_get_timing_info()</a> yourself or not work with interpolated timing at all and instead always query on the server side for the most up to date timing with <a class="el" href="stream_8h.html#c8300aa5136a223b14a5384f44564284" title="Request a timing info structure update for a stream.">pa_stream_update_timing_info()</a>.<p>
If no timing information has been recieved yet this call will return PA_ERR_NODATA. For more details see <a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb" title="Return the latest raw timing data structure.">pa_stream_get_timing_info()</a>. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a84">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="090147751441a97e04a4acef1d6514cb"></a><!-- doxytag: member="stream.h::pa_stream_get_timing_info" ref="090147751441a97e04a4acef1d6514cb" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structpa__timing__info.html">pa_timing_info</a>* pa_stream_get_timing_info           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the latest raw timing data structure. 
<p>
The returned pointer points to an internal read-only instance of the timing structure. The user should make a copy of this structure if he wants to modify it. An in-place update to this data structure may be requested using <a class="el" href="stream_8h.html#c8300aa5136a223b14a5384f44564284" title="Request a timing info structure update for a stream.">pa_stream_update_timing_info()</a>.<p>
If no timing information has been received before (i.e. by requesting <a class="el" href="stream_8h.html#c8300aa5136a223b14a5384f44564284" title="Request a timing info structure update for a stream.">pa_stream_update_timing_info()</a> or by using PA_STREAM_AUTO_TIMING_UPDATE), this function will fail with PA_ERR_NODATA.<p>
Please note that the write_index member field (and only this field) is updated on each <a class="el" href="stream_8h.html#4fc69dec0cc202fcc174125dc88dada7" title="Write some data to the server (for playback sinks), if free_cb is non-NULL this routine...">pa_stream_write()</a> call, not just when a timing update has been recieved. 
</div>
</div><p>
<a class="anchor" name="e3247516f8c8a14e158cd20ab205d678"></a><!-- doxytag: member="stream.h::pa_stream_is_corked" ref="e3247516f8c8a14e158cd20ab205d678" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_is_corked           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return 1 if the this stream has been corked. 
<p>
This will return 0 if not, and negative on error. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>

</div>
</div><p>
<a class="anchor" name="aa4234efbfc42b102edfc3f97789d257"></a><!-- doxytag: member="stream.h::pa_stream_is_suspended" ref="aa4234efbfc42b102edfc3f97789d257" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_is_suspended           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return 1 if the sink or source this stream is connected to has been suspended. 
<p>
This will return 0 if not, and negative on error. This function will return with PA_ERR_NOTSUPPORTED when the server is older than 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a43">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="b95a64207d12a1da61d31289d8b3ff3f"></a><!-- doxytag: member="stream.h::pa_stream_new" ref="b95a64207d12a1da61d31289d8b3ff3f" args="(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a>* pa_stream_new           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a> *&nbsp;</td>
          <td class="paramname"> <em>ss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__channel__map.html">pa_channel_map</a> *&nbsp;</td>
          <td class="paramname"> <em>map</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new, unconnected stream with the specified name and sample type. 
<p>
It is recommended to use <a class="el" href="stream_8h.html#5bd70e309f09679753499fa198713672" title="Create a new, unconnected stream with the specified name and sample type, and specify...">pa_stream_new_with_proplist()</a> instead and specify some initial properties. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>The context to create this stream in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>A name for this stream </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ss</em>&nbsp;</td><td>The desired sample format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>map</em>&nbsp;</td><td>The desired channel map, or NULL for default </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a52">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a34">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="5bd70e309f09679753499fa198713672"></a><!-- doxytag: member="stream.h::pa_stream_new_with_proplist" ref="5bd70e309f09679753499fa198713672" args="(pa_context *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, pa_proplist *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a>* pa_stream_new_with_proplist           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="context_8h.html#ff56e9b3dd442a88227da084bb5c380a">pa_context</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__sample__spec.html">pa_sample_spec</a> *&nbsp;</td>
          <td class="paramname"> <em>ss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__channel__map.html">pa_channel_map</a> *&nbsp;</td>
          <td class="paramname"> <em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new, unconnected stream with the specified name and sample type, and specify the the initial stream property list. 
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>The context to create this stream in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>A name for this stream </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ss</em>&nbsp;</td><td>The desired sample format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>map</em>&nbsp;</td><td>The desired channel map, or NULL for default </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The initial property list </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="c2838c449cde56e169224d7fe3d00824"></a><!-- doxytag: member="stream.h::pa_stream_peek" ref="c2838c449cde56e169224d7fe3d00824" args="(pa_stream *p, const void **data, size_t *nbytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_peek           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&nbsp;</td>
          <td class="paramname"> <em>nbytes</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read the next fragment from the buffer (for recording). 
<p>
data will point to the actual data and length will contain the size of the data in bytes (which can be less than a complete framgnet). Use <a class="el" href="stream_8h.html#2e8a3e15fb63a5bb9cbba2d01a6538a5" title="Remove the current fragment on record streams.">pa_stream_drop()</a> to actually remove the data from the buffer. If no data is available will return a NULL pointer <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The stream to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>Pointer to pointer that will point to data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nbytes</em>&nbsp;</td><td>The length of the data read in bytes </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a19">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="628650e49917cc9459a4a601a7f2a6fc"></a><!-- doxytag: member="stream.h::pa_stream_prebuf" ref="628650e49917cc9459a4a601a7f2a6fc" args="(pa_stream *s, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_prebuf           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reenable prebuffering as specified in the <a class="el" href="structpa__buffer__attr.html" title="Playback and record buffer metrics.">pa_buffer_attr</a> structure. 
<p>
Available for playback streams only. 
</div>
</div><p>
<a class="anchor" name="c113b1f9311a73b27dd894421deb4181"></a><!-- doxytag: member="stream.h::pa_stream_proplist_remove" ref="c113b1f9311a73b27dd894421deb4181" args="(pa_stream *s, const char *const keys[], pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_proplist_remove           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *const &nbsp;</td>
          <td class="paramname"> <em>keys</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Update the property list of the sink input/source output of this stream, remove entries. 
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>

</div>
</div><p>
<a class="anchor" name="5fe6f3fa88f06a6d2f7df23086dfcd19"></a><!-- doxytag: member="stream.h::pa_stream_proplist_update" ref="5fe6f3fa88f06a6d2f7df23086dfcd19" args="(pa_stream *s, pa_update_mode_t mode, pa_proplist *p, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_proplist_update           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="proplist_8h.html#4b73cd513add16a26378a7941a9f1fd9">pa_update_mode_t</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="proplist_8h.html#cdf756a6014b6fae3b358b2c934c3426">pa_proplist</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Update the property list of the sink input/source output of this stream, adding new entries. 
<p>
Please note that it is highly recommended to set as much properties initially via <a class="el" href="stream_8h.html#5bd70e309f09679753499fa198713672" title="Create a new, unconnected stream with the specified name and sample type, and specify...">pa_stream_new_with_proplist()</a> as possible instead a posteriori with this function, since that information may then be used to route this stream to the right device. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a2e5ff19aa36b90471c34badbdfdf345"></a><!-- doxytag: member="stream.h::pa_stream_readable_size" ref="a2e5ff19aa36b90471c34badbdfdf345" args="(pa_stream *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t pa_stream_readable_size           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the number of bytes that may be read using <a class="el" href="stream_8h.html#c2838c449cde56e169224d7fe3d00824" title="Read the next fragment from the buffer (for recording).">pa_stream_peek()</a>. 
<p>

</div>
</div><p>
<a class="anchor" name="5564dc25593af14ede2ee855e198467a"></a><!-- doxytag: member="stream.h::pa_stream_ref" ref="5564dc25593af14ede2ee855e198467a" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a>* pa_stream_ref           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Increase the reference counter by one. 
<p>

</div>
</div><p>
<a class="anchor" name="f662224125a43b3e8ae25b3d3684c111"></a><!-- doxytag: member="stream.h::pa_stream_set_buffer_attr" ref="f662224125a43b3e8ae25b3d3684c111" args="(pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_set_buffer_attr           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpa__buffer__attr.html">pa_buffer_attr</a> *&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Change the buffer metrics of the stream during playback. 
<p>
The server might have chosen different buffer metrics then requested. The selected metrics may be queried with <a class="el" href="stream_8h.html#9a3c3e78eafb28cce3a16cef2b68a385" title="Return the per-stream server-side buffer metrics of the stream.">pa_stream_get_buffer_attr()</a> as soon as the callback is called. Only valid after the stream has been connected successfully and if the server is at least PulseAudio 0.9.8. Please be aware of the slightly different semantics of the call depending whether PA_STREAM_ADJUST_LATENCY is set or not. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6a3d521e76540896442ef09cd12e3e2b"></a><!-- doxytag: member="stream.h::pa_stream_set_buffer_attr_callback" ref="6a3d521e76540896442ef09cd12e3e2b" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_buffer_attr_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenver the buffer attributes on the server side change. 
<p>
Please note that the buffer attributes can change when moving a stream to a different sink/source too, hence if you use this callback you should use <a class="el" href="stream_8h.html#6def5afeb0b2071f130bb373b3f114b8" title="Set the callback function that is called whenever the stream is moved to a different...">pa_stream_set_moved_callback()</a> as well. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.15 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a62">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="5690ed098466233860e632abfa61fe50"></a><!-- doxytag: member="stream.h::pa_stream_set_event_callback" ref="5690ed098466233860e632abfa61fe50" args="(pa_stream *p, pa_stream_event_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_event_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#56d668892312b7e651cdf737336710e6">pa_stream_event_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenver a meta/policy control event is received. 
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.15 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a61">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="9e42c196273746ac523353a1dc5068dc"></a><!-- doxytag: member="stream.h::pa_stream_set_latency_update_callback" ref="9e42c196273746ac523353a1dc5068dc" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_latency_update_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenever a latency information update happens. 
<p>
Useful on PA_STREAM_AUTO_TIMING_UPDATE streams only. (Only for playback streams) 
</div>
</div><p>
<a class="anchor" name="2d4b414edaa95ed08ed7e3b321a208d0"></a><!-- doxytag: member="stream.h::pa_stream_set_monitor_stream" ref="2d4b414edaa95ed08ed7e3b321a208d0" args="(pa_stream *s, uint32_t sink_input_idx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_set_monitor_stream           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>sink_input_idx</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
For record streams connected to a monitor source: monitor only a very specific sink input of the sink. 
<p>
Thus function needs to be called before <a class="el" href="stream_8h.html#bfd34293aae8f170f572d1093c1bcdf9" title="Connect the stream to a source.">pa_stream_connect_record()</a> is called. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6def5afeb0b2071f130bb373b3f114b8"></a><!-- doxytag: member="stream.h::pa_stream_set_moved_callback" ref="6def5afeb0b2071f130bb373b3f114b8" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_moved_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenever the stream is moved to a different sink/source. 
<p>
Use <a class="el" href="stream_8h.html#df568b636afbd00ff60e0c100595309e" title="Return the name of the sink or source this stream is connected to in the server.">pa_stream_get_device_name()</a>or <a class="el" href="stream_8h.html#a84f1dc4657cd2e2f52effffd4583963" title="Return the index of the sink or source this stream is connected to in the server...">pa_stream_get_device_index()</a> to query the new sink/source. This notification is only generated when the server is at least 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a57">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="ac0f980de4097a4a815bcf143df68338"></a><!-- doxytag: member="stream.h::pa_stream_set_name" ref="ac0f980de4097a4a815bcf143df68338" args="(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_set_name           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Rename the stream. 
<p>

</div>
</div><p>
<a class="anchor" name="f1e07bc89d12aca66d2725a60cfdbdc3"></a><!-- doxytag: member="stream.h::pa_stream_set_overflow_callback" ref="f1e07bc89d12aca66d2725a60cfdbdc3" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_overflow_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called when a buffer overflow happens. 
<p>
(Only for playback streams) <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a59">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="b9949b66e1aca2c1988f864e90f2ae4c"></a><!-- doxytag: member="stream.h::pa_stream_set_read_callback" ref="b9949b66e1aca2c1988f864e90f2ae4c" args="(pa_stream *p, pa_stream_request_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_read_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called when new data is available from the stream. 
<p>
Return the number of bytes read. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a55">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="aa10d78431d934b07c690bc916f3daa7"></a><!-- doxytag: member="stream.h::pa_stream_set_started_callback" ref="aa10d78431d934b07c690bc916f3daa7" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_started_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called when a the server starts playback after an underrun or on initial startup. 
<p>
This only informs that audio is flowing again, it is no indication that audio started to reach the speakers already. (Only for playback streams). <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.11 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a60">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="295da6cbb032850600598d59fed2cc18"></a><!-- doxytag: member="stream.h::pa_stream_set_state_callback" ref="295da6cbb032850600598d59fed2cc18" args="(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_state_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenever the state of the stream changes. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a53">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a35">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="4ddaac3d3a921829c3080e7c8c15a21e"></a><!-- doxytag: member="stream.h::pa_stream_set_suspended_callback" ref="4ddaac3d3a921829c3080e7c8c15a21e" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_suspended_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called whenever the sink/source this stream is connected to is suspended or resumed. 
<p>
Use <a class="el" href="stream_8h.html#aa4234efbfc42b102edfc3f97789d257" title="Return 1 if the sink or source this stream is connected to has been suspended.">pa_stream_is_suspended()</a> to query the new suspend status. Please note that the suspend status might also change when the stream is moved between devices. Thus if you call this function you very likely want to call pa_stream_set_moved_callback, too. This notification is only generated when the server is at least 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a56">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="660b5a7096409f41ef52b8e0b7e96d38"></a><!-- doxytag: member="stream.h::pa_stream_set_underflow_callback" ref="660b5a7096409f41ef52b8e0b7e96d38" args="(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_underflow_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#d2adcc8f27af8241005f3388e7081ccc">pa_stream_notify_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called when a buffer underflow happens. 
<p>
(Only for playback streams) <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a58">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="2dcc985c65964da290a0c2e1bf103175"></a><!-- doxytag: member="stream.h::pa_stream_set_write_callback" ref="2dcc985c65964da290a0c2e1bf103175" args="(pa_stream *p, pa_stream_request_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_set_write_callback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#2aebb54acebd28841fe72df24e9a5c76">pa_stream_request_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the callback function that is called when new data may be written to the stream. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a54">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a36">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="e17a3a9f6ee0403c4665f6f4ce02ca3c"></a><!-- doxytag: member="stream.h::pa_stream_trigger" ref="e17a3a9f6ee0403c4665f6f4ce02ca3c" args="(pa_stream *s, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_trigger           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request immediate start of playback on this stream. 
<p>
This disables prebuffering as specified in the <a class="el" href="structpa__buffer__attr.html" title="Playback and record buffer metrics.">pa_buffer_attr</a> structure, temporarily. Available for playback streams only. 
</div>
</div><p>
<a class="anchor" name="7780fa5438f31152b0a6aeae31b63264"></a><!-- doxytag: member="stream.h::pa_stream_unref" ref="7780fa5438f31152b0a6aeae31b63264" args="(pa_stream *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_stream_unref           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decrease the reference counter by one. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a73">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a13">paplay.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="753f1475073632fd76c0e86699deea6b"></a><!-- doxytag: member="stream.h::pa_stream_update_sample_rate" ref="753f1475073632fd76c0e86699deea6b" args="(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_update_sample_rate           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Change the stream sampling rate during playback. 
<p>
You need to pass PA_STREAM_VARIABLE_RATE in the flags parameter of pa_stream_connect() if you plan to use this function. Only valid after the stream has been connected successfully and if the server is at least PulseAudio 0.9.8. <dl class="since" compact><dt><b>Since:</b></dt><dd>0.9.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c8300aa5136a223b14a5384f44564284"></a><!-- doxytag: member="stream.h::pa_stream_update_timing_info" ref="c8300aa5136a223b14a5384f44564284" args="(pa_stream *p, pa_stream_success_cb_t cb, void *userdata)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="operation_8h.html#5614a07f2e7a129e4cb16596ed452a0c">pa_operation</a>* pa_stream_update_timing_info           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stream_8h.html#4db8260c2273ec4ddd51e0ff9fa198b0">pa_stream_success_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>userdata</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request a timing info structure update for a stream. 
<p>
Use <a class="el" href="stream_8h.html#090147751441a97e04a4acef1d6514cb" title="Return the latest raw timing data structure.">pa_stream_get_timing_info()</a> to get access to the raw timing data, or <a class="el" href="stream_8h.html#9b1caba84c7a5c90efdbcaed31e9dfca" title="Return the current playback/recording time.">pa_stream_get_time()</a> or <a class="el" href="stream_8h.html#a521efcc16fe2abf0f8461462432ac16" title="Return the total stream latency.">pa_stream_get_latency()</a> to get cleaned up values. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a86">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="b63ccd1908b6deae1b2ca7be6fa759e7"></a><!-- doxytag: member="stream.h::pa_stream_writable_size" ref="b63ccd1908b6deae1b2ca7be6fa759e7" args="(pa_stream *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t pa_stream_writable_size           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the number of bytes that may be written using <a class="el" href="stream_8h.html#4fc69dec0cc202fcc174125dc88dada7" title="Write some data to the server (for playback sinks), if free_cb is non-NULL this routine...">pa_stream_write()</a>. 
<p>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a77">pacat.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="4fc69dec0cc202fcc174125dc88dada7"></a><!-- doxytag: member="stream.h::pa_stream_write" ref="4fc69dec0cc202fcc174125dc88dada7" args="(pa_stream *p, const void *data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_stream_write           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stream_8h.html#960d798980692a2ff01e5a70553d4f29">pa_stream</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>nbytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="def_8h.html#85c8c3063d8218304c041cb9f83ec431">pa_free_cb_t</a>&nbsp;</td>
          <td class="paramname"> <em>free_cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="def_8h.html#3bd011cdb61caf568b544715b1b89def">pa_seek_mode_t</a>&nbsp;</td>
          <td class="paramname"> <em>seek</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Write some data to the server (for playback sinks), if free_cb is non-NULL this routine is called when all data has been written out and an internal reference to the specified data is kept, the data is not copied. 
<p>
If NULL, the data is copied into an internal buffer. The client my freely seek around in the output buffer. For most applications passing 0 and PA_SEEK_RELATIVE as arguments for offset and seek should be useful. Afte ther write call succeeded the write index will be a the position after where this chunk of data has been written to. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The stream to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to write </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nbytes</em>&nbsp;</td><td>The length of the data to write in bytes </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>free_cb</em>&nbsp;</td><td>A cleanup routine for the data or NULL to request an internal copy </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset for seeking, must be 0 for upload streams </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>seek</em>&nbsp;</td><td>Seek mode, must be PA_SEEK_RELATIVE for upload streams </td></tr>
  </table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="pacat_8c-example.html#a11">pacat.c</a>, and <a class="el" href="paplay_8c-example.html#a18">paplay.c</a>.</dl>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 2 04:18:20 2009 for PulseAudio by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>