classaflibaudiorecorder.html

来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 433 行 · 第 1/2 页

HTML
433
字号
<!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>aflibAudioRecorder 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>aflibAudioRecorder  Class Reference</h1>Audio timer recording class. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="aflibAudioRecorder_8h-source.html">aflibAudioRecorder.h</a>&gt;</code><p><p>Inheritance diagram for aflibAudioRecorder:<p><center><img src="classaflibAudioRecorder.png" usemap="#aflibAudioRecorder_map" border="0"></center><map name="aflibAudioRecorder_map"><area href="classaflibAudio.html" alt="aflibAudio" shape="rect" coords="66,56,188,80"><area href="classaflibChain.html" alt="aflibChain" shape="rect" coords="0,0,122,24"><area href="classaflibMemCache.html" alt="aflibMemCache" shape="rect" coords="132,0,254,24"></map><a href="classaflibAudioRecorder-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="classaflibAudioRecorder.html#a0">aflibAudioRecorder</a> (<a class="el" href="classaflibAudio.html">aflibAudio</a> &amp;audio)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Constructor that requires an audio parent.</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="classaflibAudioRecorder.html#a1">aflibAudioRecorder</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Empty constructor.</em> <a href="#a1">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="classaflibAudioRecorder.html#a2">~aflibAudioRecorder</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Destructor.</em> <a href="#a2">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="classaflibAudioRecorder.html#a3">addRecordItem</a> (const <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;start_date, const <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;stop_date, const string &amp;file, const string &amp;file_type, long long max_limit, long long each_limit, <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;config)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Adds an item to the record list.</em> <a href="#a3">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="classaflibAudioRecorder.html#a4">removeRecordItem</a> (int item)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Removes a audio record item.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioRecorder.html#a5">getNumberOfRecordItems</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Gets number of current record items.</em> <a href="#a5">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="classaflibAudioRecorder.html#a6">getRecordItem</a> (int item, <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;start_date, <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;stop_date, string &amp;file, string &amp;file_type, long long &amp;max_limit, long long &amp;each_limit, <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;config) const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Gets the data for a record item.</em> <a href="#a6">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="classaflibAudioRecorder.html#a7">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="#a7">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="classaflibAudioRecorder.html#a8">getName</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the name of the derived class.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Audio timer recording class.<p>This is a class that performs audio timer recording. This is derived from the <a class="el" href="classaflibAudio.html">aflibAudio</a> base class so it can be used in an audio chain. This is a complex class that aids the  user in developing functionality to their audio application that will perform like a VCR does for video. One creates audio record items. You supply start times, stop times, size limits, and info. Then you form this as part of a chain and loop on the process  function of this objects base class. When the start time is reached for an item it will start recording. It will stop on several criteria. One can specify multiple items and in fact they can even overlap in time.<p>ADDING RECORD ITEMS One can add record items by calling addRecordItem. One specifies all the necessary information and then make it part of the audio chain and it is ready to go. If this audio object is destroyed then the record information is lost. If one wants to start recording right away then make the start time before the current time. The recording will stop based upon when one of two criteria is reached. If the stop time is reached then recording will stop. There are also two file size limits that can be set. If these are reached before the stop time then recording will be stopped. There is a max file size limit. This will allow one to set an upper limit on the disk space that will be used by the recording. This is useful when you only have a certain amount of disk space available. There is also an each file size limit. This will allow you to set a limit on how big each audio file will be. When that limit is reached then that file will be closed and a new one will be created. The new name will be called the original name plus _&lt;number&gt; before the extension. As many files will be created until either the stop time is reached or the max file size limit is reached. For each file mode the max file size limit means the total size of all audio files created. Each file mode is useful for portable MP3 players that have a memory limit. If you want to record a long show just set a each file size limit of 30M then the show will be stored to sperate files of 30M each. Just big enough to store on a MP3 player.<p>REMOVING RECORD ITEMS One can delete already stored items by calling removeRecordItem. Just pass the item number. The item number can be obtained from calls to getNumberOfRecordItems, getRecordItem. getNumberOfRecordItems will return the total number of items stored so far. getRecordItem will return all the information for an item. The numbering of items start at one. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="aflibAudioRecorder::aflibAudioRecorder"></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"> aflibAudioRecorder::aflibAudioRecorder </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classaflibAudio.html">aflibAudio</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>audio</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 that requires an audio parent.<p>    </td>  </tr></table><a name="a1" doxytag="aflibAudioRecorder::aflibAudioRecorder"></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"> aflibAudioRecorder::aflibAudioRecorder </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>Empty constructor.<p>A empty constructor is provided for the case where this object will serve as a data collector keeping record segments stored. When it is ready to be used as part of a chain then the addParent in the base class should be called with the audio parent object.     </td>  </tr></table><a name="a2" doxytag="aflibAudioRecorder::~aflibAudioRecorder"></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"> aflibAudioRecorder::~aflibAudioRecorder </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="aflibAudioRecorder::addRecordItem"></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 aflibAudioRecorder::addRecordItem </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>start_date</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classaflibDateTime.html">aflibDateTime</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>stop_date</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const string &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>file</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const string &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>file_type</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>max_limit</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>each_limit</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>config</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Adds an item to the record list.<p>This function will add a record item to the list of record elements. Enter a start and stop date and time. A file and file type. The file_type argument must be a supported format. The list of formats can be returned from the call returnSupportedFormats from the <a class="el" href="classaflibFile.html">aflibFile</a> base class. This is a static function so it can be called at anytime. The max_limit is the total maximum disk space that can be used. Recording will stop when this value has been reached. To bypass the max file limit use -1. There is also an each_limit that can be bypassed with a -1 as well. This will split the audio into multiple files. It will start recording to a new file when this limit has been reached. Finally the config parameter will tell this class how to setup your audio file.     </td>  </tr></table><a name="a7" doxytag="aflibAudioRecorder::compute_segment"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">

⌨️ 快捷键说明

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