classaflibaudiomemoryinput.html

来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 223 行

HTML
223
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>aflibAudioMemoryInput class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.15 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>aflibAudioMemoryInput  Class Reference</h1>Provides ability to insert raw audio data into audio chain. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="aflibAudioMemoryInput_8h-source.html">aflibAudioMemoryInput.h</a>&gt;</code><p><p>Inheritance diagram for aflibAudioMemoryInput:<p><center><img src="classaflibAudioMemoryInput.png" usemap="#aflibAudioMemoryInput_map" border="0"></center><map name="aflibAudioMemoryInput_map"><area href="classaflibAudio.html" alt="aflibAudio" shape="rect" coords="76,56,218,80"><area href="classaflibChain.html" alt="aflibChain" shape="rect" coords="0,0,142,24"><area href="classaflibMemCache.html" alt="aflibMemCache" shape="rect" coords="152,0,294,24"></map><a href="classaflibAudioMemoryInput-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMemoryInput.html#a0">aflibAudioMemoryInput</a> (const <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;config)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Constructor - Default constructor.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMemoryInput.html#a1">~aflibAudioMemoryInput</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Destructor.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMemoryInput.html#a2">setAudioMemoryInputCallback</a> (<a class="el" href="aflibAudioMemoryInput_8h.html#a0">samples_callback</a> func_ptr)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Enables and disables the memory input callback.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMemoryInput.html#a3">compute_segment</a> (list&lt; <a class="el" href="classaflibData.html">aflibData</a> * &gt; &amp;data, long long position=-1)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Work function, must be implemented by derived class.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>const char *&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMemoryInput.html#a4">getName</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the name of the derived class.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Provides ability to insert raw audio data into audio chain.<p>This class allows one to insert raw data into an audio chain at the start of the chain. This class can't be used anywhere in a chain other than at the start. Once an audio chain is formed then the caller can call the process member function of the last item in the chain and retrieve the <a class="el" href="classaflibData.html">aflibData</a> object to get the raw audio data out of the chain.  Users will call the process member function at the end of an audio chain. This will result in data being requested down the chain until this class is reached. Then the samples_callback will be called requesting audio data from the user. Users of this class should call the setAudioMemoryInputCallback function to register a callback function that will provide data to the chain. This callback function shall have 5 parameters and shall return the actual number of data stored. Since this object is at the beginning of the audio chain then in order for data to be inserted into the chain the caller must register a callback function before calling the process member function of the chain. The 5 parameters are: <br> <a class="el" href="classaflibAudio.html">aflibAudio</a> * - the aflibAudioMemoryInput object that is making this call. <br> void * - pointer to the audio data memory location. <br> long - number of samples to read. <br> long - total length of samples (ie samples above * size of each sample). <br> long long - position in data stream that is requested. <br><p>The last parameter is the position of the data to read from. The user can request to start reading anywhere they wish. Thus they can start 10000 samples from the beginning of the audio data. If the user is streaming data then the library will make every attempt to request data sequentially from this class, but this is not guaranteed. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="aflibAudioMemoryInput::aflibAudioMemoryInput"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> aflibAudioMemoryInput::aflibAudioMemoryInput </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>config</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Constructor - Default constructor.<p>    </td>  </tr></table><a name="a1" doxytag="aflibAudioMemoryInput::~aflibAudioMemoryInput"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> aflibAudioMemoryInput::~aflibAudioMemoryInput </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Destructor.<p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a3" doxytag="aflibAudioMemoryInput::compute_segment"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="aflib_8h.html#a33">aflibStatus</a> aflibAudioMemoryInput::compute_segment </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">list&lt; <a class="el" href="classaflibData.html">aflibData</a> * &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>data</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>position</em> = -1</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Work function, must be implemented by derived class.<p><p>Reimplemented from <a class="el" href="classaflibAudio.html#a12">aflibAudio</a>.    </td>  </tr></table><a name="a4" doxytag="aflibAudioMemoryInput::getName"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> const char* aflibAudioMemoryInput::getName </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Returns the name of the derived class.<p><p>Reimplemented from <a class="el" href="classaflibAudio.html#a11">aflibAudio</a>.    </td>  </tr></table><a name="a2" doxytag="aflibAudioMemoryInput::setAudioMemoryInputCallback"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void aflibAudioMemoryInput::setAudioMemoryInputCallback </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="aflibAudioMemoryInput_8h.html#a0">samples_callback</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>func_ptr</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Enables and disables the memory input callback.<p>This function enables or disables the memory input callback. The callback registered must accept 5 parameters. The first is a pointer to this <a class="el" href="classaflibAudio.html">aflibAudio</a> object. This allows the caller to know which object is generating this callback. This is so that if people have multiple objects all registering the same callback. The next parameter is the pointer to the memory location to store the data in. The next is the number of elements requested to be stored into the pointer. The next is the total number of bytes to store. The last parameter is the position of the audio data that is requested.     </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="aflibAudioMemoryInput_8h-source.html">aflibAudioMemoryInput.h</a><li><a class="el" href="aflibAudioMemoryInput_8cc.html">aflibAudioMemoryInput.cc</a></ul><hr><address align="right"><small>Generated on Wed May 8 20:51:09 2002 for Open Source Audio Library Project by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?