⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classaflibaudioedit.html

📁 一个共享源码的音频库5(doc 文档)
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>aflibAudioEdit 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>aflibAudioEdit  Class Reference</h1>Provides functionality for audio editing. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="aflibAudioEdit_8h-source.html">aflibAudioEdit.h</a>&gt;</code><p><p>Inheritance diagram for aflibAudioEdit:<p><center><img src="classaflibAudioEdit.png" usemap="#aflibAudioEdit_map" border="0"></center><map name="aflibAudioEdit_map"><area href="classaflibAudio.html" alt="aflibAudio" shape="rect" coords="55,56,155,80"><area href="classaflibChain.html" alt="aflibChain" shape="rect" coords="0,0,100,24"><area href="classaflibMemCache.html" alt="aflibMemCache" shape="rect" coords="110,0,210,24"></map><a href="classaflibAudioEdit-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="classaflibAudioEdit.html#a0">aflibAudioEdit</a> (<a class="el" href="classaflibAudio.html">aflibAudio</a> &amp;audio)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Constructor - requires an <a class="el" href="classaflibAudio.html">aflibAudio</a> object.</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="classaflibAudioEdit.html#a1">~aflibAudioEdit</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="classaflibAudioEdit.html#a2">addSegment</a> (int input, long long input_start_position, long long input_stop_position, long long output_insert_position, double factor=1.0)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Add an audio clip using samples.</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="classaflibAudioEdit.html#a3">addSegment</a> (int input, double input_start_seconds, double input_stop_seconds, double output_insert_seconds, double factor=1.0)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Add an audio clip using seconds.</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="classaflibAudioEdit.html#a4">removeSegment</a> (int seg_num)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Remove an audio clip segment by segment number.</em> <a href="#a4">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="classaflibAudioEdit.html#a5">removeSegment</a> (long long output_start_position, long long output_stop_position)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Remove an audio clip segment by samples.</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="classaflibAudioEdit.html#a6">removeSegment</a> (double output_start_seconds, double output_stop_seconds)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Remove an audio clip segment by seconds.</em> <a href="#a6">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="classaflibAudioEdit.html#a7">removeSegmentsFromInput</a> (int input)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Remove all audio segments for a specific input.</em> <a href="#a7">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="classaflibAudioEdit.html#a8">getNumberOfSegments</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Gets the current number of segments that are in the audio clip list.</em> <a href="#a8">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="classaflibAudioEdit.html#a9">getSegment</a> (int segment_number, int &amp;input, long long &amp;input_start_position, long long &amp;input_stop_position, long long &amp;output_start_position, long long &amp;output_stop_position, double &amp;factor)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Retrieves information for an audio clip segment by samples.</em> <a href="#a9">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="classaflibAudioEdit.html#a10">getSegment</a> (int segment_number, int &amp;input, double &amp;input_start_seconds, double &amp;input_stop_seconds, double &amp;output_start_seconds, double &amp;output_stop_seconds, double &amp;factor)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Retrieves information for an audio clip segment by seconds.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a35">aflibUndoRedo</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a11">getUndoRedoStatus</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Not Yet Implemented.</em> <a href="#a11">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="classaflibAudioEdit.html#a12">performUndoRedo</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Not Yet Implemented.</em> <a href="#a12">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="classaflibAudioEdit.html#a13">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>Main work function.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classaflibData.html">aflibData</a> *&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a14">process</a> (<a class="el" href="aflib_8h.html#a33">aflibStatus</a> &amp;ret_status, long long position, int &amp;num_samples, bool free_memory=TRUE)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Main process function.</em> <a href="#a14">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="classaflibAudioEdit.html#a15">getName</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the name of the derived class.</em> <a href="#a15">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="classaflibAudioEdit.html#a16">parentWasDestroyed</a> (int parent_id)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Callback to notify derived class when parent was destroyed.</em> <a href="#a16">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="classaflibAudioEdit.html#a17">parentWasAdded</a> (int parent_id)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Callback to notify derived class when parent was added.</em> <a href="#a17">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="classaflibAudioEdit.html#a18">setInputConfig</a> (const <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;cfg)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Sets the input and output audio data configuration of this object.</em> <a href="#a18">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a19">isDataSizeSupported</a> (<a class="el" href="aflib_8h.html#a30">aflib_data_size</a> size)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a20">isEndianSupported</a> (<a class="el" href="aflib_8h.html#a31">aflib_data_endian</a> end)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a21">isSampleRateSupported</a> (int &amp;rate)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioEdit.html#a22">isChannelsSupported</a> (int &amp;channels)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Provides functionality for audio editing.<p>This is a class that simplifies audio editing. 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  application programmer in writing an audio editing program. It can accept multiple inputs and allows the user to add audio clip segments, remove audio clip segments,  and add or remove inputs. One can use this object in a chain so that the output of this object can be output to an audio file or device for output. Once the clip information is stored in this class it will automatically get the audio input from the correct input and route it to the output.  We also provide our own process function instead of using the base classes since we need to retrieve data from different inputs. One other current limitiation is that if a data segment that is passed to the process function spans clips from different inputs then only the input in the furst clip will be used. This will be changed in the furture as well.<p>ADDING AND REMOVING INPUTS One can add or remove inputs to this class. The constructor does require one input. An ID number is returned when additional inputs are added. The first input specified should be assumed to have an ID of 1. When an input is removed any audio clips that are obtained from this input will be removed. If all inputs are removed then FALSE will be sent to the enable function of the <a class="el" href="classaflibAudio.html">aflibAudio</a> base class to disable this object from the chain. When an input is added this object will be enabled again. The functions to add and remove inputs are provided by the <a class="el" href="classaflibChain.html">aflibChain</a> base class:<br> int <a class="el" href="classaflibChain.html#a2">addParent</a>();<br> void <a class="el" href="classaflibChain.html#a3">removeParent</a>();<br> <br> ADDING AND REMOVING AUDIO SEGMENTS Adding and removing segments is the heart of this object. This in effect allows one to map inputs to the output of this object. A typical application would be to have only one input and then add a segment that contains the entire audio segment of the input. Then the user can remove certain audio segments of this input. This makes the output look like one continuous audio stream without the segments that have been removed. The APIs here allow one to specify segments in either samples or segments. If one uses doubles then the specifcation is assumed to be seconds and if long long then samples. One can also remove a segment by the segment number. One should verify the segment number first though as segment numbers can change after segments are added, removed, or inputs removed. One can also remove all segments from a specific input. The functions to add and remove segments are: <br> void addSegment( <br> int input, <br> long long input_start_position, <br> long long input_stop_position, <br> long long output_insert_position); <br> void addSegment( <br> int input, <br> double input_start_seconds, <br> double input_stop_seconds, <br> double output_insert_seconds); <br> void <a class="el" href="classaflibAudioEdit.html#a4">removeSegment</a>(int seg_num); <br> void removeSegment( <br> long long output_start_position, <br> long long output_stop_position); <br> void removeSegment( <br> double output_start_seconds, <br> double output_stop_seconds); <br> void <a class="el" href="classaflibAudioEdit.html#a7">removeSegmentsFromInput</a>(int input); <br> <br> OBTAINING INFORMATION Several functions exist to get information on the audio segment data. One can get the total number of current segments and then one can obtain the data for any particular segment in either seconds or samples. Segments start at number 1. <br> int <a class="el" href="classaflibAudioEdit.html#a8">getNumberOfSegments</a>(); <br> void getSegment( <br> int segment_number, <br> int&amp; input, <br> long long&amp; input_start_position, <br> long long&amp; input_stop_position, <br> long long&amp; output_start_position, <br> long long&amp; output_stop_position); <br> void getSegment( <br> int segment_number, <br> int&amp; input, <br> double&amp; input_start_seconds, <br> double&amp; input_stop_seconds, <br> double&amp; output_start_seconds, <br> double&amp; output_stop_seconds); <br> <br> UNDO / REDO In the future Undo / Redo capability will be added to undo the last audio segment addition or deletion. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="aflibAudioEdit::aflibAudioEdit"></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"> aflibAudioEdit::aflibAudioEdit </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 - requires an <a class="el" href="classaflibAudio.html">aflibAudio</a> object.<p>User must create this object with at least one input. The ID for this input can be assumed to be 1.     </td>  </tr></table><a name="a1" doxytag="aflibAudioEdit::~aflibAudioEdit"></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"> aflibAudioEdit::~aflibAudioEdit </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="aflibAudioEdit::addSegment"></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 aflibAudioEdit::addSegment </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input_start_seconds</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input_stop_seconds</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>output_insert_seconds</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>factor</em> = 1.0</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>Add an audio clip using seconds.<p>This function will add a new segment at the position specified. If will push out all data after this insertion point in the existing audio clip array. This function allows one to specify the positions in seconds.     </td>  </tr></table><a name="a2" doxytag="aflibAudioEdit::addSegment"></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 aflibAudioEdit::addSegment </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input_start_position</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input_stop_position</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>output_insert_position</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>factor</em> = 1.0</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>Add an audio clip using samples.<p>This function will add a new segment at the position specified. If will push out all data after this insertion point in the existing audio clip array. This function allows one to specify the positions as samples.     </td>  </tr></table><a name="a13" doxytag="aflibAudioEdit::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> aflibAudioEdit::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>Main work function.<p>We don't do any real processing of the data. We actually only route the data. <p>Reimplemented from <a class="el" href="classaflibAudio.html#a12">aflibAudio</a>.    </td>  </tr></table><a name="a15" doxytag="aflibAudioEdit::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* aflibAudioEdit::getName </td>          <td class="md" valign="top">(&nbsp;</td>

⌨️ 快捷键说明

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