{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_AudioBuffer Struct 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="PPB_AudioBuffer" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a0d62d7fb07cae07004bbc6fbe1f14dcd">IsAudioBuffer</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a1072f128761e1869ca8bd8e31fc18b51">GetTimestamp</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a03113971cf40f80274d4475e335fbea3">SetTimestamp</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer, <a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a> timestamp)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga78757d4be14d14d17708071a9466afbd">PP_AudioBuffer_SampleRate</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a69f6c324fcc347f24f064f38a19d2465">GetSampleRate</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga2ba5c3a8eed23fa49a73b218b1bce044">PP_AudioBuffer_SampleSize</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a71f0374949280835b5db4503c4ef8e15">GetSampleSize</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a6dd92974e5543ade219fff80b8bb1a38">GetNumberOfChannels</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#abba9e5c66fb8fb01771002b9667ec80f">GetNumberOfSamples</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a6c2b7a87ea483ee31950efef6de57201">GetDataBuffer</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___audio_buffer__0__1.html#aad58d200bfdd1e1ed1e1cb6884a10570">GetDataBufferSize</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td></tr>
</table>
<hr /><h2>Field Documentation</h2>
<a class="anchor" id="a6c2b7a87ea483ee31950efef6de57201"></a><!-- doxytag: member="PPB_AudioBuffer::GetDataBuffer" ref="a6c2b7a87ea483ee31950efef6de57201" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void*(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a6c2b7a87ea483ee31950efef6de57201">PPB_AudioBuffer::GetDataBuffer</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the data buffer containing the audio samples. </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 <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<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="aad58d200bfdd1e1ed1e1cb6884a10570"></a><!-- doxytag: member="PPB_AudioBuffer::GetDataBufferSize" ref="aad58d200bfdd1e1ed1e1cb6884a10570" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#aad58d200bfdd1e1ed1e1cb6884a10570">PPB_AudioBuffer::GetDataBufferSize</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the size of the data buffer in bytes. </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 <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<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="a6dd92974e5543ade219fff80b8bb1a38"></a><!-- doxytag: member="PPB_AudioBuffer::GetNumberOfChannels" ref="a6dd92974e5543ade219fff80b8bb1a38" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a6dd92974e5543ade219fff80b8bb1a38">PPB_AudioBuffer::GetNumberOfChannels</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the number of channels in 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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<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="abba9e5c66fb8fb01771002b9667ec80f"></a><!-- doxytag: member="PPB_AudioBuffer::GetNumberOfSamples" ref="abba9e5c66fb8fb01771002b9667ec80f" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#abba9e5c66fb8fb01771002b9667ec80f">PPB_AudioBuffer::GetNumberOfSamples</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the number of samples in 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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<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 4410 * 2 samples would have a duration of 100 milliseconds. </dd></dl>
</div>
</div>
<a class="anchor" id="a69f6c324fcc347f24f064f38a19d2465"></a><!-- doxytag: member="PPB_AudioBuffer::GetSampleRate" ref="a69f6c324fcc347f24f064f38a19d2465" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga78757d4be14d14d17708071a9466afbd">PP_AudioBuffer_SampleRate</a>(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a69f6c324fcc347f24f064f38a19d2465">PPB_AudioBuffer::GetSampleRate</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the sample rate 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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The sample rate of the audio buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="a71f0374949280835b5db4503c4ef8e15"></a><!-- doxytag: member="PPB_AudioBuffer::GetSampleSize" ref="a71f0374949280835b5db4503c4ef8e15" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga2ba5c3a8eed23fa49a73b218b1bce044">PP_AudioBuffer_SampleSize</a>(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a71f0374949280835b5db4503c4ef8e15">PPB_AudioBuffer::GetSampleSize</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the sample size 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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The sample size of the audio buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="a1072f128761e1869ca8bd8e31fc18b51"></a><!-- doxytag: member="PPB_AudioBuffer::GetTimestamp" ref="a1072f128761e1869ca8bd8e31fc18b51" args=")(PP_Resource buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a>(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a1072f128761e1869ca8bd8e31fc18b51">PPB_AudioBuffer::GetTimestamp</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets 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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource.</td></tr>
</table>
</dd>
</dl>
<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="a0d62d7fb07cae07004bbc6fbe1f14dcd"></a><!-- doxytag: member="PPB_AudioBuffer::IsAudioBuffer" ref="a0d62d7fb07cae07004bbc6fbe1f14dcd" args=")(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a0d62d7fb07cae07004bbc6fbe1f14dcd">PPB_AudioBuffer::IsAudioBuffer</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determines if a resource is an AudioBuffer resource. </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>The <code>PP_Resource</code> to test.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given resource is an AudioBuffer resource or <code>PP_FALSE</code> otherwise. </dd></dl>
</div>
</div>
<a class="anchor" id="a03113971cf40f80274d4475e335fbea3"></a><!-- doxytag: member="PPB_AudioBuffer::SetTimestamp" ref="a03113971cf40f80274d4475e335fbea3" args=")(PP_Resource buffer, PP_TimeDelta timestamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="struct_p_p_b___audio_buffer__0__1.html#a03113971cf40f80274d4475e335fbea3">PPB_AudioBuffer::SetTimestamp</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> buffer, <a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a> timestamp)</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">buffer</td><td>A <code>PP_Resource</code> corresponding to an audio buffer resource. </td></tr>
<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 struct was generated from the following file:<ul>
<li><a class="el" href="ppb__audio__buffer_8h.html">ppb_audio_buffer.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}