classaflibfile.html
来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 1,188 行 · 第 1/4 页
HTML
1,188 行
<!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>aflibFile 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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>aflibFile Class Reference</h1>Base class for audio file/device reading and writing. <a href="#_details">More...</a><p><code>#include <<a class="el" href="aflibFile_8h-source.html">aflibFile.h</a>></code><p><p>Inheritance diagram for aflibFile:<p><center><img src="classaflibFile.png" usemap="#aflibFile_map" border="0"></center><map name="aflibFile_map"><area href="classaflibAifcFile.html" alt="aflibAifcFile" shape="rect" coords="163,56,316,80"><area href="classaflibAiffFile.html" alt="aflibAiffFile" shape="rect" coords="163,112,316,136"><area href="classaflibAuFile.html" alt="aflibAuFile" shape="rect" coords="163,168,316,192"><area href="classaflibBladeFile.html" alt="aflibBladeFile" shape="rect" coords="163,224,316,248"><area href="classaflibDevFile.html" alt="aflibDevFile" shape="rect" coords="163,280,316,304"><area href="classaflibLameFile.html" alt="aflibLameFile" shape="rect" coords="163,336,316,360"><area href="classaflibMpg123File.html" alt="aflibMpg123File" shape="rect" coords="163,392,316,416"><area href="classaflibMpgFile.html" alt="aflibMpgFile" shape="rect" coords="163,448,316,472"><area href="classaflibOggFile.html" alt="aflibOggFile" shape="rect" coords="163,504,316,528"><area href="classaflibSolarisSparcDevFile.html" alt="aflibSolarisSparcDevFile" shape="rect" coords="163,560,316,584"><area href="classaflibSoxFile.html" alt="aflibSoxFile" shape="rect" coords="163,616,316,640"><area href="classaflibWavFile.html" alt="aflibWavFile" shape="rect" coords="163,672,316,696"></map><a href="classaflibFile-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>virtual </td><td valign=bottom><a class="el" href="classaflibFile.html#a0">~aflibFile</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Destructor.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="aflib_8h.html#a33">aflibStatus</a> </td><td valign=bottom><a class="el" href="classaflibFile.html#a1">afopen</a> (const char *file, <a class="el" href="classaflibConfig.html">aflibConfig</a> *cfg)</td></tr><tr><td> </td><td><font size=-1><em>Main API for opening a file or device in read mode.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="aflib_8h.html#a33">aflibStatus</a> </td><td valign=bottom><a class="el" href="classaflibFile.html#a2">afcreate</a> (const char *file, const <a class="el" href="classaflibConfig.html">aflibConfig</a> &cfg)</td></tr><tr><td> </td><td><font size=-1><em>Main API for opening a file or device in write mode.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="aflib_8h.html#a33">aflibStatus</a> </td><td valign=bottom><a class="el" href="classaflibFile.html#a3">afread</a> (<a class="el" href="classaflibData.html">aflibData</a> &data, long long position=-1)</td></tr><tr><td> </td><td><font size=-1><em>Main API function to read a segment of data.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="aflib_8h.html#a33">aflibStatus</a> </td><td valign=bottom><a class="el" href="classaflibFile.html#a4">afwrite</a> (<a class="el" href="classaflibData.html">aflibData</a> &data, long long position=-1)</td></tr><tr><td> </td><td><font size=-1><em>Main API function to write a segment of audio data.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a5">setItem</a> (const char *item, const void *value)</td></tr><tr><td> </td><td><font size=-1><em>Provides the ability to set format specific information.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a6">getItem</a> (const char *item, void *value)</td></tr><tr><td> </td><td><font size=-1><em>Provides the ability to get format specific information.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>const string & </td><td valign=bottom><a class="el" href="classaflibFile.html#a7">getFormat</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Return the current file or device format.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classaflibFile.html#a8">setInputConfig</a> (const <a class="el" href="classaflibConfig.html">aflibConfig</a> &cfg)</td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classaflibConfig.html">aflibConfig</a> & </td><td valign=bottom><a class="el" href="classaflibFile.html#a9">getInputConfig</a> () const</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibFile.html#a10">setOutputConfig</a> (const <a class="el" href="classaflibConfig.html">aflibConfig</a> &cfg)</td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classaflibConfig.html">aflibConfig</a> & </td><td valign=bottom><a class="el" href="classaflibFile.html#a11">getOutputConfig</a> () const</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibFile.html#a12">setValue1</a> (const string &value)</td></tr><tr><td> </td><td><font size=-1><em>Set a file format unique value number 1.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibFile.html#a13">setValue2</a> (const string &value)</td></tr><tr><td> </td><td><font size=-1><em>Set a file format unique value number 2.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibFile.html#a14">setValue3</a> (const string &value)</td></tr><tr><td> </td><td><font size=-1><em>Set a file format unique value number 3.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a15">isDataSizeSupported</a> (<a class="el" href="aflib_8h.html#a30">aflib_data_size</a> size)</td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a16">isEndianSupported</a> (<a class="el" href="aflib_8h.html#a31">aflib_data_endian</a> end)</td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a17">isSampleRateSupported</a> (int &rate)</td></tr><tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classaflibFile.html#a18">isChannelsSupported</a> (int &channels)</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibFile.html#d0">returnSupportedFormats</a> (list< string > &formats, list< string > &descriptions)</td></tr><tr><td> </td><td><font size=-1><em>Returns all currently supported formats.</em> <a href="#d0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>const list< <a class="el" href="classaflibFileItem.html">aflibFileItem</a> * > & </td><td valign=bottom><a class="el" href="classaflibFile.html#d1">returnSupportedFormats</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Returns all currently supported formats.</em> <a href="#d1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>aflibFile * </td><td valign=bottom><a class="el" href="classaflibFile.html#d2">open</a> (<a class="el" href="aflib_8h.html#a34">aflibFileType</a> type_enum, const string &file, <a class="el" href="classaflibConfig.html">aflibConfig</a> *cfg=NULL, <a class="el" href="aflib_8h.html#a33">aflibStatus</a> *status=NULL)</td></tr><tr><td> </td><td><font size=-1><em>Main static function to open a file or device for reading based on aflibFileType.</em> <a href="#d2">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>aflibFile * </td><td valign=bottom><a class="el" href="classaflibFile.html#d3">open</a> (const string &format, const string &file, <a class="el" href="classaflibConfig.html">aflibConfig</a> *cfg=NULL, <a class="el" href="aflib_8h.html#a33">aflibStatus</a> *status=NULL)</td></tr><tr><td> </td><td><font size=-1><em>Main static function to open a file or device for reading based on format string.</em> <a href="#d3">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>aflibFile * </td><td valign=bottom><a class="el" href="classaflibFile.html#d4">create</a> (<a class="el" href="aflib_8h.html#a34">aflibFileType</a> type_enum, const string &file, const <a class="el" href="classaflibConfig.html">aflibConfig</a> &cfg, <a class="el" href="aflib_8h.html#a33">aflibStatus</a> *status=NULL)</td></tr><tr><td> </td><td><font size=-1><em>Main static function for writing to a device or file by type.</em> <a href="#d4">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>aflibFile * </td><td valign=bottom><a class="el" href="classaflibFile.html#d5">create</a> (const string &format, const string &file, const <a class="el" href="classaflibConfig.html">aflibConfig</a> &cfg, <a class="el" href="aflib_8h.html#a33">aflibStatus</a> *status=NULL)</td></tr><tr><td> </td><td><font size=-1><em>Main static function for writing to a device or file by format.</em> <a href="#d5">More...</a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classaflibFile.html#b0">aflibFile</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="classaflibFile.html#n0">_total_size</a></td></tr><tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="classaflibFile.html#n1">_one_second_size</a></td></tr><tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="classaflibFile.html#n2">_current_place_size</a></td></tr><tr><td nowrap align=right valign=top>string </td><td valign=bottom><a class="el" href="classaflibFile.html#n3">_value1</a></td></tr><tr><td nowrap align=right valign=top>string </td><td valign=bottom><a class="el" href="classaflibFile.html#n4">_value2</a></td></tr><tr><td nowrap align=right valign=top>string </td><td valign=bottom><a class="el" href="classaflibFile.html#n5">_value3</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Base class for audio file/device reading and writing.<p>This is the base class for all audio file and device objects. It provides the functionality for calling derived classes and defines the API for these derived classes. The main entry APIs are the open and create static functions. Users actually use these. This will in turn allocate an object of the proper derived class. There are no public constructors for this class. Also static is a function called returnSupportedFormats. It will return all the current supported file formats. Once an object is allocated and initialized then one can call getFormat to get the file format that is currently being used.<p>The functions afopen, afcreate, afread, and afwrite are all virtual and are designed to be overriden by the derived classes. Also there are three functions called setValue1, setValue2, and setValue3. These can be used to pass implementation dependant info to a file format.<p>This class supports the ability to dynamically load and free these derived objects. These derived objects will each be made into a library that will be loaded only when needed.<p>This class can be compiled with the flag NO_MODULES. If it is then the file objects will not be dynamically loaded. Instead applications will have to link against these libraries. Also only certain file formats will be supported. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="aflibFile::~aflibFile"></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"> aflibFile::~aflibFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Destructor.<p> </td> </tr></table><a name="b0" doxytag="aflibFile::aflibFile"></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"> aflibFile::aflibFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="aflibFile::afcreate"></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> aflibFile::afcreate </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>file</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classaflibConfig.html">aflibConfig</a> & </td> <td class="mdname" nowrap> <em>cfg</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Main API for opening a file or device in write mode.<p>This function is only used for module support. For no module support the derived classes afcreate function will be called instead. For module support this function will make a call to the derived classes function. <p>Reimplemented in <a class="el" href="classaflibAifcFile.html#a3">aflibAifcFile</a>, <a class="el" href="classaflibAiffFile.html#a3">aflibAiffFile</a>, <a class="el" href="classaflibAuFile.html#a3">aflibAuFile</a>, <a class="el" href="classaflibBladeFile.html#a3">aflibBladeFile</a>, <a class="el" href="classaflibLameFile.html#a3">aflibLameFile</a>, <a class="el" href="classaflibMpgFile.html#a3">aflibMpgFile</a>, <a class="el" href="classaflibMpg123File.html#a3">aflibMpg123File</a>, <a class="el" href="classaflibOggFile.html#a3">aflibOggFile</a>, <a class="el" href="classaflibDevFile.html#a3">aflibDevFile</a>, <a class="el" href="classaflibSolarisSparcDevFile.html#a3">aflibSolarisSparcDevFile</a>, <a class="el" href="classaflibSoxFile.html#a3">aflibSoxFile</a>, and <a class="el" href="classaflibWavFile.html#a3">aflibWavFile</a>. </td> </tr></table><a name="a1" doxytag="aflibFile::afopen"></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> aflibFile::afopen </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>file</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classaflibConfig.html">aflibConfig</a> * </td> <td class="mdname" nowrap> <em>cfg</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Main API for opening a file or device in read mode.<p>This function is only used for module support. For no modules support the derived classes afopen function will be called instead. For module support this function will make a call to the derived classes function. <p>Reimplemented in <a class="el" href="classaflibAifcFile.html#a2">aflibAifcFile</a>, <a class="el" href="classaflibAiffFile.html#a2">aflibAiffFile</a>, <a class="el" href="classaflibAuFile.html#a2">aflibAuFile</a>, <a class="el" href="classaflibBladeFile.html#a2">aflibBladeFile</a>, <a class="el" href="classaflibLameFile.html#a2">aflibLameFile</a>, <a class="el" href="classaflibMpgFile.html#a2">aflibMpgFile</a>, <a class="el" href="classaflibMpg123File.html#a2">aflibMpg123File</a>, <a class="el" href="classaflibOggFile.html#a2">aflibOggFile</a>, <a class="el" href="classaflibDevFile.html#a2">aflibDevFile</a>, <a class="el" href="classaflibSolarisSparcDevFile.html#a2">aflibSolarisSparcDevFile</a>, <a class="el" href="classaflibSoxFile.html#a2">aflibSoxFile</a>, and <a class="el" href="classaflibWavFile.html#a2">aflibWavFile</a>. </td> </tr></table><a name="a3" doxytag="aflibFile::afread"></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> aflibFile::afread </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classaflibData.html">aflibData</a> & </td> <td class="mdname" nowrap> <em>data</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>long long </td> <td class="mdname" nowrap> <em>position</em> = -1</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Main API function to read a segment of data.<p>This function is only used for module support. For no module support the derived classes afread function will be called instead. For module support this function will make a call to the derived classes function. <p>Reimplemented in <a class="el" href="classaflibAifcFile.html#a4">aflibAifcFile</a>, <a class="el" href="classaflibAiffFile.html#a4">aflibAiffFile</a>, <a class="el" href="classaflibAuFile.html#a4">aflibAuFile</a>, <a class="el" href="classaflibBladeFile.html#a4">aflibBladeFile</a>, <a class="el" href="classaflibLameFile.html#a4">aflibLameFile</a>, <a class="el" href="classaflibMpgFile.html#a4">aflibMpgFile</a>, <a class="el" href="classaflibMpg123File.html#a4">aflibMpg123File</a>, <a class="el" href="classaflibOggFile.html#a4">aflibOggFile</a>, <a class="el" href="classaflibDevFile.html#a4">aflibDevFile</a>, <a class="el" href="classaflibSolarisSparcDevFile.html#a4">aflibSolarisSparcDevFile</a>, <a class="el" href="classaflibSoxFile.html#a4">aflibSoxFile</a>, and <a class="el" href="classaflibWavFile.html#a4">aflibWavFile</a>. </td> </tr></table><a name="a4" doxytag="aflibFile::afwrite"></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> aflibFile::afwrite </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classaflibData.html">aflibData</a> & </td> <td class="mdname" nowrap> <em>data</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>long long </td> <td class="mdname" nowrap> <em>position</em> = -1</td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?