<!-- This comment will put IE 6, 7 and 8 in quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ALSA project - the C library reference: /builddir/build/BUILD/alsa-lib-1.0.23/include/pcm_extplug.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javaScript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.6.2-20100208 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <img id="MSearchSelect" src="search/search.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </div> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>/builddir/build/BUILD/alsa-lib-1.0.23/include/pcm_extplug.h</h1><a href="pcm__extplug_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00010"></a>00010 <span class="comment">/*</span> <a name="l00011"></a>00011 <span class="comment"> * ALSA external PCM plugin SDK (draft version)</span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * Copyright (c) 2005 Takashi Iwai <tiwai@suse.de></span> <a name="l00014"></a>00014 <span class="comment"> *</span> <a name="l00015"></a>00015 <span class="comment"> * This library is free software; you can redistribute it and/or modify</span> <a name="l00016"></a>00016 <span class="comment"> * it under the terms of the GNU Lesser General Public License as</span> <a name="l00017"></a>00017 <span class="comment"> * published by the Free Software Foundation; either version 2.1 of</span> <a name="l00018"></a>00018 <span class="comment"> * the License, or (at your option) any later version.</span> <a name="l00019"></a>00019 <span class="comment"> *</span> <a name="l00020"></a>00020 <span class="comment"> * This program is distributed in the hope that it will be useful,</span> <a name="l00021"></a>00021 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00022"></a>00022 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00023"></a>00023 <span class="comment"> * GNU Lesser General Public License for more details.</span> <a name="l00024"></a>00024 <span class="comment"> *</span> <a name="l00025"></a>00025 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span> <a name="l00026"></a>00026 <span class="comment"> * License along with this library; if not, write to the Free Software</span> <a name="l00027"></a>00027 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span> <a name="l00028"></a>00028 <span class="comment"> *</span> <a name="l00029"></a>00029 <span class="comment"> */</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#ifndef __ALSA_PCM_EXTPLUG_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define __ALSA_PCM_EXTPLUG_H</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00042"></a>00042 <span class="keyword">enum</span> { <a name="l00043"></a><a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9ea627234d455a7d4652aacead45cf650ab">00043</a> <a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9ea627234d455a7d4652aacead45cf650ab">SND_PCM_EXTPLUG_HW_FORMAT</a>, <a name="l00044"></a><a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9ea24eab971805f640763f6ffd9f60875dd">00044</a> <a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9ea24eab971805f640763f6ffd9f60875dd">SND_PCM_EXTPLUG_HW_CHANNELS</a>, <a name="l00045"></a><a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9eae359079bba1fec51841cd82179961801">00045</a> <a class="code" href="group___p_c_m___ext_plug.html#gga61dadd085c1777f559549e05962b2c9eae359079bba1fec51841cd82179961801">SND_PCM_EXTPLUG_HW_PARAMS</a> <a name="l00046"></a>00046 }; <a name="l00047"></a>00047 <a name="l00049"></a>00049 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug.html">snd_pcm_extplug</a> snd_pcm_extplug_t; <a name="l00051"></a>00051 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug__callback.html">snd_pcm_extplug_callback</a> snd_pcm_extplug_callback_t; <a name="l00052"></a>00052 <a name="l00053"></a>00053 <span class="comment">/*</span> <a name="l00054"></a>00054 <span class="comment"> * Protocol version</span> <a name="l00055"></a>00055 <span class="comment"> */</span> <a name="l00056"></a><a class="code" href="group___p_c_m___ext_plug.html#ga82e7bf8a5b451792195a70cb74e31fc4">00056</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_MAJOR 1 </span> <a name="l00057"></a><a class="code" href="group___p_c_m___ext_plug.html#ga40f40d20f8683751fdbb25b1f9ed013c">00057</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_MINOR 0 </span> <a name="l00058"></a><a class="code" href="group___p_c_m___ext_plug.html#ga685e379757c606a4d2a7fcc969cc5dc1">00058</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_TINY 1 </span> <a name="l00062"></a><a class="code" href="group___p_c_m___ext_plug.html#ga24d0ae71d106f08685d9ba8c6cf5fe78">00062</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) |\</span> <a name="l00063"></a>00063 <span class="preprocessor"> (SND_PCM_EXTPLUG_VERSION_MINOR<<8) |\</span> <a name="l00064"></a>00064 <span class="preprocessor"> (SND_PCM_EXTPLUG_VERSION_TINY))</span> <a name="l00065"></a>00065 <span class="preprocessor"></span> <a name="l00067"></a><a class="code" href="structsnd__pcm__extplug.html">00067</a> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug.html">snd_pcm_extplug</a> { <a name="l00072"></a><a class="code" href="structsnd__pcm__extplug.html#a91421a1d534f85fc70b2303f955a0f6b">00072</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#a91421a1d534f85fc70b2303f955a0f6b">version</a>; <a name="l00076"></a><a class="code" href="structsnd__pcm__extplug.html#a01ae590e2eb20d8054e29e4300a82706">00076</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structsnd__pcm__extplug.html#a01ae590e2eb20d8054e29e4300a82706">name</a>; <a name="l00080"></a><a class="code" href="structsnd__pcm__extplug.html#a881db5dcbe25076c7bd9fcef0a4f4f11">00080</a> <span class="keyword">const</span> snd_pcm_extplug_callback_t *<a class="code" href="structsnd__pcm__extplug.html#a881db5dcbe25076c7bd9fcef0a4f4f11">callback</a>; <a name="l00084"></a><a class="code" href="structsnd__pcm__extplug.html#a650a6f0a958357f7b91782cd729efa5b">00084</a> <span class="keywordtype">void</span> *<a class="code" href="structsnd__pcm__extplug.html#a650a6f0a958357f7b91782cd729efa5b">private_data</a>; <a name="l00088"></a><a class="code" href="structsnd__pcm__extplug.html#a37cd10fee022b34b8030d15f5cb0dbd0">00088</a> <a class="code" href="group___p_c_m.html#ga919e634deecd855b6e2e15174e70d3ea">snd_pcm_t</a> *<a class="code" href="structsnd__pcm__extplug.html#a37cd10fee022b34b8030d15f5cb0dbd0">pcm</a>; <a name="l00092"></a><a class="code" href="structsnd__pcm__extplug.html#a3ea13d6c27a29ecac48b00304888379b">00092</a> <a class="code" href="group___p_c_m.html#gac23b43ff55add78638e503b9cc892c24">snd_pcm_stream_t</a> <a class="code" href="structsnd__pcm__extplug.html#a3ea13d6c27a29ecac48b00304888379b">stream</a>; <a name="l00096"></a><a class="code" href="structsnd__pcm__extplug.html#a59aa86f8835a785e12e85a59107d8ed7">00096</a> <a class="code" href="group___p_c_m.html#gaa14b7f26877a812acbb39811364177f8">snd_pcm_format_t</a> <a class="code" href="structsnd__pcm__extplug.html#a59aa86f8835a785e12e85a59107d8ed7">format</a>; <a name="l00100"></a><a class="code" href="structsnd__pcm__extplug.html#a97a6650ec5390d450510558bb9ccdbe0">00100</a> <a class="code" href="group___p_c_m.html#ga1e5fe73a6bdf881e2f91921d5e5327c7">snd_pcm_subformat_t</a> <a class="code" href="structsnd__pcm__extplug.html#a97a6650ec5390d450510558bb9ccdbe0">subformat</a>; <a name="l00104"></a><a class="code" href="structsnd__pcm__extplug.html#a7af1a9cf446c5336d06e13194a367399">00104</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#a7af1a9cf446c5336d06e13194a367399">channels</a>; <a name="l00108"></a><a class="code" href="structsnd__pcm__extplug.html#a8deeec4189830a54d5f26be1f1f2bd2d">00108</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#a8deeec4189830a54d5f26be1f1f2bd2d">rate</a>; <a name="l00112"></a><a class="code" href="structsnd__pcm__extplug.html#af7139d1d35e334ac6c14b5e51b38d285">00112</a> <a class="code" href="group___p_c_m.html#gaa14b7f26877a812acbb39811364177f8">snd_pcm_format_t</a> <a class="code" href="structsnd__pcm__extplug.html#af7139d1d35e334ac6c14b5e51b38d285">slave_format</a>; <a name="l00116"></a><a class="code" href="structsnd__pcm__extplug.html#a23a61b2db905d645fcdf98f9c86715a7">00116</a> <a class="code" href="group___p_c_m.html#ga1e5fe73a6bdf881e2f91921d5e5327c7">snd_pcm_subformat_t</a> <a class="code" href="structsnd__pcm__extplug.html#a23a61b2db905d645fcdf98f9c86715a7">slave_subformat</a>; <a name="l00120"></a><a class="code" href="structsnd__pcm__extplug.html#a866bd487dd9c2a25be8420bc2dfb3213">00120</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#a866bd487dd9c2a25be8420bc2dfb3213">slave_channels</a>; <a name="l00121"></a>00121 }; <a name="l00122"></a>00122 <a name="l00124"></a><a class="code" href="structsnd__pcm__extplug__callback.html">00124</a> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug__callback.html">snd_pcm_extplug_callback</a> { <a name="l00128"></a>00128 <a class="code" href="group___p_c_m.html#ga71cdfa37e258d2210b8bd0216bf0c36c">snd_pcm_sframes_t</a> (*<a class="code" href="structsnd__pcm__extplug__callback.html#a5c1c8cb34f5c1df7af6141362f473091">transfer</a>)(snd_pcm_extplug_t *ext, <a name="l00129"></a>00129 <span class="keyword">const</span> <a class="code" href="structsnd__pcm__channel__area__t.html">snd_pcm_channel_area_t</a> *dst_areas, <a name="l00130"></a>00130 <a class="code" href="group___p_c_m.html#gab01fcfe9b97382a8d3f2027c664b8b8a">snd_pcm_uframes_t</a> dst_offset, <a name="l00131"></a>00131 <span class="keyword">const</span> <a class="code" href="structsnd__pcm__channel__area__t.html">snd_pcm_channel_area_t</a> *src_areas, <a name="l00132"></a>00132 <a class="code" href="group___p_c_m.html#gab01fcfe9b97382a8d3f2027c664b8b8a">snd_pcm_uframes_t</a> src_offset, <a name="l00133"></a>00133 <a class="code" href="group___p_c_m.html#gab01fcfe9b97382a8d3f2027c664b8b8a">snd_pcm_uframes_t</a> size); <a name="l00137"></a>00137 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#a7e26f4025337be9d0b36e9e248ba92ae">close</a>)(snd_pcm_extplug_t *ext); <a name="l00141"></a>00141 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#a7215432f6873a74e5f24da0817a3bbae">hw_params</a>)(snd_pcm_extplug_t *ext, <a class="code" href="group___p_c_m.html#ga65c737127994f0a980edad744e36dc40">snd_pcm_hw_params_t</a> *params); <a name="l00145"></a>00145 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#ad24a08d2400288d5e708a6886b8be50f">hw_free</a>)(snd_pcm_extplug_t *ext); <a name="l00149"></a>00149 void (*<a class="code" href="structsnd__pcm__extplug__callback.html#a6532c068bce5dc458d8fd0a9e45284d2">dump</a>)(snd_pcm_extplug_t *ext, <a class="code" href="group___output.html#ga49729cc6454539495c1f5b6e95cd474a" title="Internal structure for an output object.">snd_output_t</a> *out); <a name="l00153"></a>00153 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#a75b2bd7ec54d8617c16dd2842b9d4bfe">init</a>)(snd_pcm_extplug_t *ext); <a name="l00154"></a>00154 }; <a name="l00155"></a>00155 <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gab0b27889f74c83cd033062981320fd62" title="Create an extplug instance.">snd_pcm_extplug_create</a>(snd_pcm_extplug_t *ext, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a name="l00158"></a>00158 <a class="code" href="group___config.html#ga1c20905af775ae77d04d1a5696f67985" title="Internal structure for a configuration node object.">snd_config_t</a> *root, <a class="code" href="group___config.html#ga1c20905af775ae77d04d1a5696f67985" title="Internal structure for a configuration node object.">snd_config_t</a> *slave_conf, <a name="l00159"></a>00159 <a class="code" href="group___p_c_m.html#gac23b43ff55add78638e503b9cc892c24">snd_pcm_stream_t</a> stream, <span class="keywordtype">int</span> mode); <a name="l00160"></a>00160 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#ga7259292a6f64a2432f4c2a44bb5f8508" title="Delete the extplug instance.">snd_pcm_extplug_delete</a>(snd_pcm_extplug_t *ext); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="comment">/* clear hw_parameter setting */</span> <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="group___p_c_m___ext_plug.html#gacef181565eb697397ce41c1aab381777" title="Reset extplug parameters.">snd_pcm_extplug_params_reset</a>(snd_pcm_extplug_t *ext); <a name="l00164"></a>00164 <a name="l00165"></a>00165 <span class="comment">/* hw_parameter setting */</span> <a name="l00166"></a>00166 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gadbf27adba1a7cd0195b6ac750bb11bf7" title="Set master parameter as the list.">snd_pcm_extplug_set_param_list</a>(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_list, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *list); <a name="l00167"></a>00167 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gabef139bbe5db265433fd5310d0faad4d" title="Set master parameter as the min/max values.">snd_pcm_extplug_set_param_minmax</a>(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> min, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max); <a name="l00168"></a>00168 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gad14f6746e36d556c7a7937633b965ca7" title="Set slave parameter as the list.">snd_pcm_extplug_set_slave_param_list</a>(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_list, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *list); <a name="l00169"></a>00169 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gad3cac0ee15293f349220a75cce69a51e" title="Set slave parameter as the min/max values.">snd_pcm_extplug_set_slave_param_minmax</a>(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> min, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max); <a name="l00170"></a>00170 <a name="l00174"></a>00174 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val) <a name="l00175"></a>00175 { <a name="l00176"></a>00176 <span class="keywordflow">return</span> <a class="code" href="group___p_c_m___ext_plug.html#gadbf27adba1a7cd0195b6ac750bb11bf7" title="Set master parameter as the list.">snd_pcm_extplug_set_param_list</a>(extplug, type, 1, &val); <a name="l00177"></a>00177 } <a name="l00178"></a>00178 <a name="l00182"></a>00182 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> snd_pcm_extplug_set_slave_param(snd_pcm_extplug_t *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val) <a name="l00183"></a>00183 { <a name="l00184"></a>00184 <span class="keywordflow">return</span> <a class="code" href="group___p_c_m___ext_plug.html#gad14f6746e36d556c7a7937633b965ca7" title="Set slave parameter as the list.">snd_pcm_extplug_set_slave_param_list</a>(extplug, type, 1, &val); <a name="l00185"></a>00185 } <a name="l00186"></a>00186 <a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* __ALSA_PCM_EXTPLUG_H */</span> </pre></div></div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right;"><small> Generated for ALSA project - the C library reference by <a href="http://www.doxygen.org/ index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.2-20100208</small></address> </body> </html>