chromium/native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_media_stream_audio_track.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::MediaStreamAudioTrack Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::MediaStreamAudioTrack" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::MediaStreamAudioTrack:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_media_stream_audio_track__inherit__graph.png" border="0" usemap="#pp_1_1_media_stream_audio_track_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_media_stream_audio_track_inherit__map" id="pp_1_1_media_stream_audio_track_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="52,5,156,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_media_stream_audio_track-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#aba4674796b58027523c3429e6e6c977f">MediaStreamAudioTrack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#adc7d45a01c7f7e27a94a033e957e0587">MediaStreamAudioTrack</a> (const <a class="el" href="classpp_1_1_media_stream_audio_track.html">MediaStreamAudioTrack</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a5b0e9a5ede7bb5e265007b9e2b7c06f9">MediaStreamAudioTrack</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#ad0f8599de42327cda5850db05b1b5be6">MediaStreamAudioTrack</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a4efdf0aeb1ec01ff29c16c94174bc1f8">~MediaStreamAudioTrack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#ad3572da8199315fc90248f5634358211">Configure</a> (const int32_t attributes[], const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#ac1767869e698082610ee3f9cb5a28561">GetAttrib</a> (PP_MediaStreamAudioTrack_Attrib attrib, int32_t *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#ac04877194c84ddbb004265e476275a46">GetId</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#ae1be4d89810f272b4e43b1ca07a7b0de">HasEnded</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#acc9e47e460bae4a6d0ade366b5cf33ed">GetBuffer</a> (const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>&lt; <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> &gt; &amp;callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a0601e973dc3020973cfb001ee320aa36">RecycleBuffer</a> (const <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> &amp;buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a2ad0471a5fb098f84ec301d52bca269a">Close</a> ()</td></tr>
</table><h2>
Static Public Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a66b94f4551e3e1db35fc9cdfdb686097">IsMediaStreamAudioTrack</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;resource)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code> class contains methods for receiving audio buffers from a MediaStream audio track in the browser. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aba4674796b58027523c3429e6e6c977f"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::MediaStreamAudioTrack" ref="aba4674796b58027523c3429e6e6c977f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_media_stream_audio_track.html#aba4674796b58027523c3429e6e6c977f">pp::MediaStreamAudioTrack::MediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default constructor for creating an <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</a> <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code> object. </p>
</div>
</div>
<a class="anchor" id="adc7d45a01c7f7e27a94a033e957e0587"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::MediaStreamAudioTrack" ref="adc7d45a01c7f7e27a94a033e957e0587" args="(const MediaStreamAudioTrack &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_media_stream_audio_track.html#aba4674796b58027523c3429e6e6c977f">pp::MediaStreamAudioTrack::MediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_media_stream_audio_track.html">MediaStreamAudioTrack</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The copy constructor for <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A reference to a <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5b0e9a5ede7bb5e265007b9e2b7c06f9"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::MediaStreamAudioTrack" ref="a5b0e9a5ede7bb5e265007b9e2b7c06f9" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_media_stream_audio_track.html#aba4674796b58027523c3429e6e6c977f">pp::MediaStreamAudioTrack::MediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [explicit]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructs a <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code> from a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_MediaStreamAudioTrack</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad0f8599de42327cda5850db05b1b5be6"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::MediaStreamAudioTrack" ref="ad0f8599de42327cda5850db05b1b5be6" args="(PassRef, PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_media_stream_audio_track.html#aba4674796b58027523c3429e6e6c977f">pp::MediaStreamAudioTrack::MediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor used when you have received a <code>PP_Resource</code> as a return value that has had 1 ref added for you. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_MediaStreamAudioTrack</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4efdf0aeb1ec01ff29c16c94174bc1f8"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::~MediaStreamAudioTrack" ref="a4efdf0aeb1ec01ff29c16c94174bc1f8" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_media_stream_audio_track.html#a4efdf0aeb1ec01ff29c16c94174bc1f8">pp::MediaStreamAudioTrack::~MediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="a2ad0471a5fb098f84ec301d52bca269a"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::Close" ref="a2ad0471a5fb098f84ec301d52bca269a" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_media_stream_audio_track.html#a2ad0471a5fb098f84ec301d52bca269a">pp::MediaStreamAudioTrack::Close</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Closes the MediaStream audio track, and disconnects it from the audio source. </p>
<p>After calling <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#a2ad0471a5fb098f84ec301d52bca269a" title="Closes the MediaStream audio track, and disconnects it from the audio source.">Close()</a></code>, no new buffers will be received. </p>
</div>
</div>
<a class="anchor" id="ad3572da8199315fc90248f5634358211"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::Configure" ref="ad3572da8199315fc90248f5634358211" args="(const int32_t attributes[], const CompletionCallback &amp;callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_audio_track.html#ad3572da8199315fc90248f5634358211">pp::MediaStreamAudioTrack::Configure</a> </td>
<td>(</td>
<td class="paramtype">const int32_t&#160;</td>
<td class="paramname"><em>attributes</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
<td class="paramname"><em>callback</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Configures underlying buffer buffers for incoming audio samples. </p>
<p>If the application doesn't want to drop samples, then the <code>PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS</code> should be chosen such that inter-buffer processing time variability won't overrun all input buffers. If all buffers are filled, then samples will be dropped. The application can detect this by examining the timestamp on returned buffers. If <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#ad3572da8199315fc90248f5634358211" title="Configures underlying buffer buffers for incoming audio samples.">Configure()</a></code> is not called, default settings will be used. Calls to Configure while the plugin holds buffers will fail. Example usage from plugin code: </p>
<div class="fragment"><pre class="fragment"> int32_t attribs[] = {
     PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS, 4,
     PP_MEDIASTREAMAUDIOTRACK_ATTRIB_DURATION, 10,
     PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE};
 track.Configure(attribs, callback);
</pre></div><dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">attrib_list</td><td>A list of attribute name-value pairs in which each attribute is immediately followed by the corresponding desired value. The list is terminated by <code>PP_MEDIASTREAMAUDIOTRACK_AUDIO_NONE</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#ad3572da8199315fc90248f5634358211" title="Configures underlying buffer buffers for incoming audio samples.">Configure()</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ac1767869e698082610ee3f9cb5a28561"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::GetAttrib" ref="ac1767869e698082610ee3f9cb5a28561" args="(PP_MediaStreamAudioTrack_Attrib attrib, int32_t *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_audio_track.html#ac1767869e698082610ee3f9cb5a28561">pp::MediaStreamAudioTrack::GetAttrib</a> </td>
<td>(</td>
<td class="paramtype">PP_MediaStreamAudioTrack_Attrib&#160;</td>
<td class="paramname"><em>attrib</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t *&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets attribute value for a given attribute name. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">attrib</td><td>A <code>PP_MediaStreamAudioTrack_Attrib</code> for querying. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">value</td><td>A int32_t for storing the attribute value.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="acc9e47e460bae4a6d0ade366b5cf33ed"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::GetBuffer" ref="acc9e47e460bae4a6d0ade366b5cf33ed" args="(const CompletionCallbackWithOutput&lt; AudioBuffer &gt; &amp;callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_audio_track.html#acc9e47e460bae4a6d0ade366b5cf33ed">pp::MediaStreamAudioTrack::GetBuffer</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>&lt; <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>callback</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the next audio buffer from the MediaStream track. </p>
<p>If internal processing is slower than the incoming buffer rate, new buffers will be dropped from the incoming stream. Once all buffers are full, audio samples will be dropped until <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#a0601e973dc3020973cfb001ee320aa36" title="Recycles a buffer returned by GetBuffer(), so the track can reuse the buffer.">RecycleBuffer()</a></code> is called to free a spot for another buffer. If there are no audio data in the input buffer, <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the <code>callback</code> will be called when a new buffer of audio samples is received or some error happens.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a></code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#acc9e47e460bae4a6d0ade366b5cf33ed" title="Gets the next audio buffer from the MediaStream track.">GetBuffer()</a></code>. If success, an <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> will be passed into the completion callback function.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ac04877194c84ddbb004265e476275a46"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::GetId" ref="ac04877194c84ddbb004265e476275a46" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="classpp_1_1_media_stream_audio_track.html#ac04877194c84ddbb004265e476275a46">pp::MediaStreamAudioTrack::GetId</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the track ID of the underlying MediaStream audio track. </p>
</div>
</div>
<a class="anchor" id="ae1be4d89810f272b4e43b1ca07a7b0de"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::HasEnded" ref="ae1be4d89810f272b4e43b1ca07a7b0de" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_media_stream_audio_track.html#ae1be4d89810f272b4e43b1ca07a7b0de">pp::MediaStreamAudioTrack::HasEnded</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether the underlying MediaStream track has ended. </p>
<p>Calls to GetBuffer while the track has ended are safe to make and will complete, but will fail. </p>
</div>
</div>
<a class="anchor" id="a66b94f4551e3e1db35fc9cdfdb686097"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::IsMediaStreamAudioTrack" ref="a66b94f4551e3e1db35fc9cdfdb686097" args="(const Resource &amp;resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classpp_1_1_media_stream_audio_track.html#a66b94f4551e3e1db35fc9cdfdb686097">pp::MediaStreamAudioTrack::IsMediaStreamAudioTrack</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> is a MediaStream audio track, to test whether it is appropriate for use with the <code><a class="el" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio...">MediaStreamAudioTrack</a></code> constructor. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> to test.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if <code>resource</code> is a MediaStream audio track. </dd></dl>
</div>
</div>
<a class="anchor" id="a0601e973dc3020973cfb001ee320aa36"></a><!-- doxytag: member="pp::MediaStreamAudioTrack::RecycleBuffer" ref="a0601e973dc3020973cfb001ee320aa36" args="(const AudioBuffer &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_audio_track.html#a0601e973dc3020973cfb001ee320aa36">pp::MediaStreamAudioTrack::RecycleBuffer</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>buffer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Recycles a buffer returned by <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#acc9e47e460bae4a6d0ade366b5cf33ed" title="Gets the next audio buffer from the MediaStream track.">GetBuffer()</a></code>, so the track can reuse the buffer. </p>
<p>And the buffer will become invalid. The caller should release all references it holds to <code>buffer</code> and not use it anymore.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>A <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a> returned by <code><a class="el" href="classpp_1_1_media_stream_audio_track.html#acc9e47e460bae4a6d0ade366b5cf33ed" title="Gets the next audio buffer from the MediaStream track.">GetBuffer()</a></code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="media__stream__audio__track_8h.html">media_stream_audio_track.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}