📄 classima__adpcm.html
字号:
<td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>dstOffset</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const <a class="el" href="group__integers.html#ga4">int16</a> * </td> <td class="mdname" nowrap> <em>src</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__integers.html#ga6">uint</a> </td> <td class="mdname" nowrap> <em>srcSize</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Encode a buffer of 16 bit uniform PCM values into ADPCM values.<p>Two ADPCM values are stored in each byte. The value stored in bits 0-3 corresponds to the sample preceding that stored in bits 4-7. Note, if the last encoded ADPCM value is stored in bits 0-3, then bits 4-7 will be cleared to zero.<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>dst</em> </td><td>Pointer to location to store ADPCM values. </td></tr> <tr><td valign="top"></td><td valign="top"><em>dstOffset</em> </td><td>Offset from <em>dst</em>, in number-of-bits, at which the decoded values will be stored. I.e. the least significant bit of the first ADPCM value will be stored in byte <div class="fragment"><pre class="fragment"> dst[dstOffset>>3] </pre></div> at bit position <div class="fragment"><pre class="fragment"> dstOffset&7 </pre></div> Where the bit 0 is the least significant bit in a byte and bit 7 is the most significant bit. The value of <em>dstOffset</em> must be a multiple of 4. </td></tr> <tr><td valign="top"></td><td valign="top"><em>src</em> </td><td>Pointer to the buffer of PCM values to be converted. </td></tr> <tr><td valign="top"></td><td valign="top"><em>srcSize</em> </td><td>The size, in bytes, of the buffer at <em>src</em>. Must be a multiple of 2.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of bits which were stored at dst.</dd></dl><p>Definition at line <a class="el" href="IMA__ADPCM_8cpp-source.html#l00160">160</a> of file <a class="el" href="IMA__ADPCM_8cpp-source.html">IMA_ADPCM.cpp</a>. </td> </tr></table><a class="anchor" name="a4" doxytag="IMA_ADPCM::Decode"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__integers.html#ga6">uint</a> IMA_ADPCM::Decode </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__integers.html#ga4">int16</a> * </td> <td class="mdname" nowrap> <em>dst</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const <a class="el" href="group__integers.html#ga0">uint8</a> * </td> <td class="mdname" nowrap> <em>src</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>srcOffset</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__integers.html#ga6">uint</a> </td> <td class="mdname" nowrap> <em>srcSize</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Decode a buffer of ADPCM values into 16 bit uniform PCM values.<p>Two ADPCM values are stored in each byte. The value stored in bits 0-3 corresponds to the sample preceding that stored in bits 4-7.<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>dst</em> </td><td>Pointer to location to store PCM values. </td></tr> <tr><td valign="top"></td><td valign="top"><em>src</em> </td><td>Pointer to the buffer of ADPCM values to be converted. </td></tr> <tr><td valign="top"></td><td valign="top"><em>srcOffset</em> </td><td>Offset from <em>src</em>, in number-of-bits, from which the ADPCM values will be read. I.e. the least significant bit of the first ADPCM value will be read from byte <div class="fragment"><pre class="fragment"> src[srcOffset>>3] </pre></div> at bit position <div class="fragment"><pre class="fragment"> srcOffset&7 </pre></div> Where the bit 0 is the least significant bit in a byte and bit 7 is the most significant bit. The value of <em>srcOffset</em> must be a multiple of 4. </td></tr> <tr><td valign="top"></td><td valign="top"><em>srcSize</em> </td><td>The number of bits to be read from the buffer at <em>src</em>. Must be a multiple of the size of 4.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of bytes which were stored at dst.</dd></dl><p>Definition at line <a class="el" href="IMA__ADPCM_8cpp-source.html#l00197">197</a> of file <a class="el" href="IMA__ADPCM_8cpp-source.html">IMA_ADPCM.cpp</a>. </td> </tr></table><hr><h2>Member Data Documentation</h2><a class="anchor" name="o0" doxytag="IMA_ADPCM::PredictedValue"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__integers.html#ga4">int16</a> <a class="el" href="classIMA__ADPCM.html#o0">IMA_ADPCM::PredictedValue</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The predicted value of the next sample. Typically, this value is read from the header, or written to the header, of a block of ADPCM values.<p>Definition at line <a class="el" href="IMA__ADPCM_8h-source.html#l00142">142</a> of file <a class="el" href="IMA__ADPCM_8h-source.html">IMA_ADPCM.h</a>. </td> </tr></table><a class="anchor" name="o1" doxytag="IMA_ADPCM::StepIndex"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__integers.html#ga0">uint8</a> <a class="el" href="classIMA__ADPCM.html#o1">IMA_ADPCM::StepIndex</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The step index used for the next ADPCM value Typically, this value is read from the header, or written to the header, of a block of ADPCM values.<p>Definition at line <a class="el" href="IMA__ADPCM_8h-source.html#l00149">149</a> of file <a class="el" href="IMA__ADPCM_8h-source.html">IMA_ADPCM.h</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li>audio/<a class="el" href="IMA__ADPCM_8h-source.html">IMA_ADPCM.h</a><li>audio/<a class="el" href="IMA__ADPCM_8cpp-source.html">IMA_ADPCM.cpp</a></ul><HR><ADDRESS STYLE="align: right;"><SMALL>Generated by <A HREF="http://www.doxygen.org/index.html"><IMG SRC="doxygen.png" ALT="doxygen" ALIGN="middle" BORDER="0"></A> 1.4.1</SMALL></ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -