classaflibdevfile.html
来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 442 行 · 第 1/2 页
HTML
442 行
<!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>aflibDevFile 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>aflibDevFile Class Reference</h1>Derived class to read and write to a Linux audio device. <a href="#_details">More...</a><p><code>#include <<a class="el" href="aflibDevFile_8h-source.html">aflibDevFile.h</a>></code><p><p>Inheritance diagram for aflibDevFile:<p><center><img src="classaflibDevFile.png" usemap="#aflibDevFile_map" border="0"></center><map name="aflibDevFile_map"><area href="classaflibFile.html" alt="aflibFile" shape="rect" coords="0,0,80,24"></map><a href="classaflibDevFile-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> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a0">aflibDevFile</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a1">~aflibDevFile</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a2">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="#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> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a3">afcreate</a> (const char *file, const <a class="el" href="classaflibConfig.html">aflibConfig</a> &config)</td></tr><tr><td> </td><td><font size=-1><em>Main API for opening a file or device in write mode.</em> <a href="#a3">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> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a4">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="#a4">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> </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a5">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="#a5">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a6">setItem</a> (const char *item, const void *value)</td></tr><tr><td> </td><td><font size=-1><em>Processes unique information for the Linux sound device.</em> <a href="#a6">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="classaflibDevFile.html#a7">programDevice</a> ()</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a8">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 </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a9">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 </td><td valign=bottom><a class="el" href="classaflibDevFile.html#a10">isSampleRateSupported</a> (int &rate)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Derived class to read and write to a Linux audio device.<p>This is the class for Linux Device audio file reading and writing. It is based on the OSS API. It is as follows:<p>Controlling the format data can be done by ioctl commands as follows: SNDCTL_DSP_SETFMT - Set Format of data to and from port AFMT_U8 - Unsigned 8 bit data AFMT_S16_LE - Signed 16 bit data Little Endian SNDCTL_DSP_STEREO - Set number of channels 0 - Mono 1 - Stereo SNDCTL_DSP_SPEED - Sample Rate in samples per second SNDCTL_DSP_SETFRAGMENT - Set buffer sizes 0xMMMMSSSS - 2 to the SSSS power gives size of buffer. MMMM is num of fragments SNDCTL_DSP_GETBLKSIZE - Get fragment size in bytes <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="aflibDevFile::aflibDevFile"></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"> aflibDevFile::aflibDevFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="a1" doxytag="aflibDevFile::~aflibDevFile"></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"> aflibDevFile::~aflibDevFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></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="a3" doxytag="aflibDevFile::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> aflibDevFile::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>config</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 from <a class="el" href="classaflibFile.html#a2">aflibFile</a>. </td> </tr></table><a name="a2" doxytag="aflibDevFile::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> aflibDevFile::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 from <a class="el" href="classaflibFile.html#a1">aflibFile</a>. </td> </tr></table><a name="a4" doxytag="aflibDevFile::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> aflibDevFile::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>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?