📄 aflibconfig_8h-source.html
字号:
<!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>aflibConfig.h Source File</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>aflibConfig.h</h1><a href="aflibConfig_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>00002 <font class="comment"> * Copyright: (C) 1999-2001 Bruce W. Forsberg</font>00003 <font class="comment"> *</font>00004 <font class="comment"> * This library is free software; you can redistribute it and/or</font>00005 <font class="comment"> * modify it under the terms of the GNU Lesser General Public</font>00006 <font class="comment"> * License as published by the Free Software Foundation; either</font>00007 <font class="comment"> * version 2.1 of the License, or any later version.</font>00008 <font class="comment"> *</font>00009 <font class="comment"> * This library is distributed in the hope that it will be useful,</font>00010 <font class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</font>00011 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>00012 <font class="comment"> * Lesser General Public License for more details.</font>00013 <font class="comment"> *</font>00014 <font class="comment"> * You should have received a copy of the GNU Lesser General Public</font>00015 <font class="comment"> * License along with this library; if not, write to the Free Software</font>00016 <font class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</font>00017 <font class="comment"> *</font>00018 <font class="comment"> * Bruce Forsberg forsberg@tns.net</font>00019 <font class="comment"> *</font>00020 <font class="comment"> */</font>00021 00022 00023 <font class="preprocessor">#ifndef _AFLIBCONFIG_H_</font>00024 <font class="preprocessor"></font><font class="preprocessor">#define _AFLIBCONFIG_H_</font>00025 <font class="preprocessor"></font>00026 00027 <font class="preprocessor">#ifdef HAVE_CONFIG_H</font>00028 <font class="preprocessor"></font><font class="preprocessor">#include <config.h></font>00029 <font class="preprocessor">#endif</font>00030 <font class="preprocessor"></font>00031 <font class="comment">// Note that g++ does not really need this. If -O with compile func in .h will be inline</font><a name="l00032"></a><a class="code" href="aflibConfig_8h.html#a0">00032</a> <font class="preprocessor">#define INLINE inline</font>00033 <font class="preprocessor"></font>00034 <font class="preprocessor">#include "<a class="code" href="aflib_8h.html">aflib.h</a>"</font>00035 00036 00045 <font class="keyword">class </font><a class="code" href="classaflibConfig.html">aflibConfig</a> {00046 00047 <font class="keyword">public</font>:00048 00049 <a class="code" href="classaflibConfig.html#a0">aflibConfig</a>();00050 00051 <a class="code" href="classaflibConfig.html#a0">aflibConfig</a>(00052 <font class="keywordtype">int</font> num_channels,00053 <a class="code" href="aflib_8h.html#a30">aflib_data_size</a> bits_per_sample,00054 <font class="keywordtype">int</font> samples_per_second);00055 00056 <a class="code" href="classaflibConfig.html#a2">~aflibConfig</a>();00057 00059 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00060 <font class="keywordtype">int</font><a name="l00061"></a><a class="code" href="classaflibConfig.html#a3">00061</a> <a class="code" href="classaflibConfig.html#a3">getChannels</a>()<font class="keyword"> const</font>00062 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_channels); };00063 00065 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00066 <font class="keywordtype">void</font><a name="l00067"></a><a class="code" href="classaflibConfig.html#a4">00067</a> <a class="code" href="classaflibConfig.html#a4">setChannels</a>(<font class="keywordtype">int</font> channels) 00068 { _channels = channels; };00069 00071 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00072 <font class="keywordtype">int</font><a name="l00073"></a><a class="code" href="classaflibConfig.html#a5">00073</a> <a class="code" href="classaflibConfig.html#a5">getBitsPerSample</a>()<font class="keyword"> const</font>00074 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_bits_per_sample); };00075 00077 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00078 <a class="code" href="aflib_8h.html#a30">aflib_data_size</a><a name="l00079"></a><a class="code" href="classaflibConfig.html#a6">00079</a> <a class="code" href="classaflibConfig.html#a6">getSampleSize</a>()<font class="keyword"> const</font>00080 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_sample_size); };00081 00083 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00084 <font class="keywordtype">void</font><a name="l00085"></a><a class="code" href="classaflibConfig.html#a7">00085</a> <a class="code" href="classaflibConfig.html#a7">setSampleSize</a>(<a class="code" href="aflib_8h.html#a30">aflib_data_size</a> bits_per_sample)00086 { _sample_size = bits_per_sample; _bits_per_sample = returnBitsPerSample(_sample_size); };00087 00089 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00090 <font class="keywordtype">int</font><a name="l00091"></a><a class="code" href="classaflibConfig.html#a8">00091</a> <a class="code" href="classaflibConfig.html#a8">getSamplesPerSecond</a>()<font class="keyword"> const</font>00092 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_samples_per_second); };00093 00095 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00096 <font class="keywordtype">void</font><a name="l00097"></a><a class="code" href="classaflibConfig.html#a9">00097</a> <a class="code" href="classaflibConfig.html#a9">setSamplesPerSecond</a>(<font class="keywordtype">int</font> samples_per_second)00098 { _samples_per_second = samples_per_second; };00099 00101 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00102 <a class="code" href="aflib_8h.html#a32">aflib_data_orientation</a><a name="l00103"></a><a class="code" href="classaflibConfig.html#a10">00103</a> <a class="code" href="classaflibConfig.html#a10">getDataOrientation</a>()<font class="keyword"> const</font>00104 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_data_orientation); };00105 00107 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00108 <font class="keywordtype">void</font><a name="l00109"></a><a class="code" href="classaflibConfig.html#a11">00109</a> <a class="code" href="classaflibConfig.html#a11">setDataOrientation</a>(<a class="code" href="aflib_8h.html#a32">aflib_data_orientation</a> data_orientation)00110 { _data_orientation = data_orientation; };00111 00113 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00114 <a class="code" href="aflib_8h.html#a31">aflib_data_endian</a><a name="l00115"></a><a class="code" href="classaflibConfig.html#a12">00115</a> <a class="code" href="classaflibConfig.html#a12">getDataEndian</a>()<font class="keyword"> const</font>00116 <font class="keyword"> </font>{ <font class="keywordflow">return</font> (_data_endian); };00117 00119 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00120 <font class="keywordtype">void</font><a name="l00121"></a><a class="code" href="classaflibConfig.html#a13">00121</a> <a class="code" href="classaflibConfig.html#a13">setDataEndian</a>(<a class="code" href="aflib_8h.html#a31">aflib_data_endian</a> data_endian)00122 { _data_endian = data_endian; };00123 00125 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00126 <font class="keywordtype">long</font> <font class="keywordtype">long</font> <a name="l00127"></a><a class="code" href="classaflibConfig.html#a14">00127</a> <a class="code" href="classaflibConfig.html#a14">getTotalSamples</a>()<font class="keyword"> const </font>00128 <font class="keyword"> </font>{ <font class="keywordflow">return</font>(_total_size); };00129 00131 <a class="code" href="aflibConfig_8h.html#a0">INLINE</a>00132 <font class="keywordtype">void</font><a name="l00133"></a><a class="code" href="classaflibConfig.html#a15">00133</a> <a class="code" href="classaflibConfig.html#a15">setTotalSamples</a>(<font class="keywordtype">long</font> <font class="keywordtype">long</font> total)00134 { _total_size = total; };00135 00136 <font class="keyword">private</font>:00137 00138 <font class="keywordtype">int</font>00139 returnBitsPerSample(<a class="code" href="aflib_8h.html#a30">aflib_data_size</a> size);00140 00141 <font class="keywordtype">int</font> _channels;00142 <font class="keywordtype">int</font> _bits_per_sample;00143 <a class="code" href="aflib_8h.html#a30">aflib_data_size</a> _sample_size;00144 <font class="keywordtype">int</font> _samples_per_second;00145 <a class="code" href="aflib_8h.html#a32">aflib_data_orientation</a> _data_orientation;00146 <a class="code" href="aflib_8h.html#a31">aflib_data_endian</a> _data_endian;00147 <font class="keywordtype">long</font> <font class="keywordtype">long</font> _total_size;00148 00149 };00150 00151 00152 <font class="preprocessor">#endif</font></pre></div><hr><address align="right"><small>Generated on Wed May 8 20:51:05 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -