chromium/native_client_sdk/doc_generated/pepper_dev/cpp/classpp_1_1_audio_buffer.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::AudioBuffer 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::AudioBuffer" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::AudioBuffer:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_audio_buffer__inherit__graph.png" border="0" usemap="#pp_1_1_audio_buffer_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_audio_buffer_inherit__map" id="pp_1_1_audio_buffer_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="13,5,117,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_audio_buffer-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_audio_buffer.html#ae5a21e1df405d530d9280de36791dbbf">AudioBuffer</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_audio_buffer.html#a8f51aeb6d98ff9d926ee1e2fcee4f712">AudioBuffer</a> (const <a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</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_audio_buffer.html#a96db6e6a05eb834ed8b04ef8c3f6647a">AudioBuffer</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_audio_buffer.html#ad80595164aba1e9fbe1ccc71793c48f9">AudioBuffer</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#aa47da494df014dd6dba16053f914ce34">~AudioBuffer</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_TimeDelta&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#a08f55c4a972677114bb0c0e1ceb13661">GetTimestamp</a> () const </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_audio_buffer.html#a2882ec7147f4efddf3cefc6378f11f78">SetTimestamp</a> (PP_TimeDelta timestamp)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_AudioBuffer_SampleRate&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#a650c3a1abc424e21fa56997c9d55b76f">GetSampleRate</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_AudioBuffer_SampleSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#ac3846435b70b49392dec120716e0cfd5">GetSampleSize</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#a3061bf5fc031ad6854d2b06ef6f6736a">GetNumberOfChannels</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#ad588d83a59d151fb8448ea59f6f9039e">GetNumberOfSamples</a> () const </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_audio_buffer.html#aad0cdf64f6fc99ebbad26725ba17df65">GetDataBuffer</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_audio_buffer.html#a5548630a163439b2c811ab40d7cd64a0">GetDataBufferSize</a> () const </td></tr>
</table>
<hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae5a21e1df405d530d9280de36791dbbf"></a><!-- doxytag: member="pp::AudioBuffer::AudioBuffer" ref="ae5a21e1df405d530d9280de36791dbbf" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_audio_buffer.html#ae5a21e1df405d530d9280de36791dbbf">pp::AudioBuffer::AudioBuffer</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_audio_buffer.html">AudioBuffer</a></code> object. </p>
</div>
</div>
<a class="anchor" id="a8f51aeb6d98ff9d926ee1e2fcee4f712"></a><!-- doxytag: member="pp::AudioBuffer::AudioBuffer" ref="a8f51aeb6d98ff9d926ee1e2fcee4f712" args="(const AudioBuffer &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_audio_buffer.html#ae5a21e1df405d530d9280de36791dbbf">pp::AudioBuffer::AudioBuffer</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>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_audio_buffer.html">AudioBuffer</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 an <code><a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a96db6e6a05eb834ed8b04ef8c3f6647a"></a><!-- doxytag: member="pp::AudioBuffer::AudioBuffer" ref="a96db6e6a05eb834ed8b04ef8c3f6647a" 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_audio_buffer.html#ae5a21e1df405d530d9280de36791dbbf">pp::AudioBuffer::AudioBuffer</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 an <code><a class="el" href="classpp_1_1_audio_buffer.html">AudioBuffer</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_AudioBuffer</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad80595164aba1e9fbe1ccc71793c48f9"></a><!-- doxytag: member="pp::AudioBuffer::AudioBuffer" ref="ad80595164aba1e9fbe1ccc71793c48f9" 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_audio_buffer.html#ae5a21e1df405d530d9280de36791dbbf">pp::AudioBuffer::AudioBuffer</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_AudioBuffer</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa47da494df014dd6dba16053f914ce34"></a><!-- doxytag: member="pp::AudioBuffer::~AudioBuffer" ref="aa47da494df014dd6dba16053f914ce34" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classpp_1_1_audio_buffer.html#aa47da494df014dd6dba16053f914ce34">pp::AudioBuffer::~AudioBuffer</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="aad0cdf64f6fc99ebbad26725ba17df65"></a><!-- doxytag: member="pp::AudioBuffer::GetDataBuffer" ref="aad0cdf64f6fc99ebbad26725ba17df65" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="classpp_1_1_audio_buffer.html#aad0cdf64f6fc99ebbad26725ba17df65">pp::AudioBuffer::GetDataBuffer</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the data buffer containing the audio buffer samples. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the beginning of the data buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="a5548630a163439b2c811ab40d7cd64a0"></a><!-- doxytag: member="pp::AudioBuffer::GetDataBufferSize" ref="a5548630a163439b2c811ab40d7cd64a0" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="classpp_1_1_audio_buffer.html#a5548630a163439b2c811ab40d7cd64a0">pp::AudioBuffer::GetDataBufferSize</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the size of data buffer in bytes. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The size of the data buffer in bytes. </dd></dl>
</div>
</div>
<a class="anchor" id="a3061bf5fc031ad6854d2b06ef6f6736a"></a><!-- doxytag: member="pp::AudioBuffer::GetNumberOfChannels" ref="a3061bf5fc031ad6854d2b06ef6f6736a" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="classpp_1_1_audio_buffer.html#a3061bf5fc031ad6854d2b06ef6f6736a">pp::AudioBuffer::GetNumberOfChannels</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the number of channels in the audio buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of channels in the audio buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="ad588d83a59d151fb8448ea59f6f9039e"></a><!-- doxytag: member="pp::AudioBuffer::GetNumberOfSamples" ref="ad588d83a59d151fb8448ea59f6f9039e" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="classpp_1_1_audio_buffer.html#ad588d83a59d151fb8448ea59f6f9039e">pp::AudioBuffer::GetNumberOfSamples</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the number of samples in the audio buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of samples in the audio buffer. For example, at a sampling rate of 44,100 Hz in stereo audio, a buffer containing 4,410 * 2 samples would have a duration of 100 milliseconds. </dd></dl>
</div>
</div>
<a class="anchor" id="a650c3a1abc424e21fa56997c9d55b76f"></a><!-- doxytag: member="pp::AudioBuffer::GetSampleRate" ref="a650c3a1abc424e21fa56997c9d55b76f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_AudioBuffer_SampleRate <a class="el" href="classpp_1_1_audio_buffer.html#a650c3a1abc424e21fa56997c9d55b76f">pp::AudioBuffer::GetSampleRate</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the sample rate of the audio buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The sample rate of the audio buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="ac3846435b70b49392dec120716e0cfd5"></a><!-- doxytag: member="pp::AudioBuffer::GetSampleSize" ref="ac3846435b70b49392dec120716e0cfd5" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_AudioBuffer_SampleSize <a class="el" href="classpp_1_1_audio_buffer.html#ac3846435b70b49392dec120716e0cfd5">pp::AudioBuffer::GetSampleSize</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the sample size of the audio buffer in bytes. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The sample size of the audio buffer in bytes. </dd></dl>
</div>
</div>
<a class="anchor" id="a08f55c4a972677114bb0c0e1ceb13661"></a><!-- doxytag: member="pp::AudioBuffer::GetTimestamp" ref="a08f55c4a972677114bb0c0e1ceb13661" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_TimeDelta <a class="el" href="classpp_1_1_audio_buffer.html#a08f55c4a972677114bb0c0e1ceb13661">pp::AudioBuffer::GetTimestamp</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the timestamp of the audio buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_TimeDelta</code> containing the timestamp of the audio buffer. Given in seconds since the start of the containing audio stream. </dd></dl>
</div>
</div>
<a class="anchor" id="a2882ec7147f4efddf3cefc6378f11f78"></a><!-- doxytag: member="pp::AudioBuffer::SetTimestamp" ref="a2882ec7147f4efddf3cefc6378f11f78" args="(PP_TimeDelta timestamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_audio_buffer.html#a2882ec7147f4efddf3cefc6378f11f78">pp::AudioBuffer::SetTimestamp</a> </td>
<td>(</td>
<td class="paramtype">PP_TimeDelta&#160;</td>
<td class="paramname"><em>timestamp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the timestamp of the audio buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">timestamp</td><td>A <code>PP_TimeDelta</code> containing the timestamp of the audio buffer. Given in seconds since the start of the containing audio stream. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="audio__buffer_8h.html">audio_buffer.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}