<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.3.1"/> <title>PortAudio: pa_linux_alsa.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">PortAudio  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.3.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <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> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#typedef-members">Typedefs</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">pa_linux_alsa.h File Reference<div class="ingroups"><a class="el" href="group__public__header.html">Public API definitions for users of PortAudio</a></div></div> </div> </div><!--header--> <div class="contents"> <p>ALSA-specific PortAudio API extension header file. <a href="#details">More...</a></p> <div class="textblock"><code>#include "<a class="el" href="portaudio_8h_source.html">portaudio.h</a>"</code><br/> </div> <p><a href="pa__linux__alsa_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structPaAlsaStreamInfo.html">PaAlsaStreamInfo</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr class="memitem:a8d6a70937ff5ede403e3bdefadb6485d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d6a70937ff5ede403e3bdefadb6485d"></a> typedef struct <a class="el" href="structPaAlsaStreamInfo.html">PaAlsaStreamInfo</a> </td><td class="memItemRight" valign="bottom"><b>PaAlsaStreamInfo</b></td></tr> <tr class="separator:a8d6a70937ff5ede403e3bdefadb6485d"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ac33a394742540a3b6666d77698a72e82"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#ac33a394742540a3b6666d77698a72e82">PaAlsa_InitializeStreamInfo</a> (<a class="el" href="structPaAlsaStreamInfo.html">PaAlsaStreamInfo</a> *info)</td></tr> <tr class="separator:ac33a394742540a3b6666d77698a72e82"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:accc41e7fd89dc0a6163d54a4f25fb242"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#accc41e7fd89dc0a6163d54a4f25fb242">PaAlsa_EnableRealtimeScheduling</a> (<a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> *s, int enable)</td></tr> <tr class="separator:accc41e7fd89dc0a6163d54a4f25fb242"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac31edeb99ef568fc89418d77bd4ca624"><td class="memItemLeft" align="right" valign="top"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#ac31edeb99ef568fc89418d77bd4ca624">PaAlsa_GetStreamInputCard</a> (<a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> *s, int *card)</td></tr> <tr class="separator:ac31edeb99ef568fc89418d77bd4ca624"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a04d7cd7252120eadf0ab3141ba5a7d93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#a04d7cd7252120eadf0ab3141ba5a7d93">PaAlsa_GetStreamOutputCard</a> (<a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> *s, int *card)</td></tr> <tr class="separator:a04d7cd7252120eadf0ab3141ba5a7d93"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a76f60d6f1ba6a298c038a9f3a6dccc53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#a76f60d6f1ba6a298c038a9f3a6dccc53">PaAlsa_SetNumPeriods</a> (int numPeriods)</td></tr> <tr class="separator:a76f60d6f1ba6a298c038a9f3a6dccc53"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2992cf7c30de5aaea222ec762fc56ad1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#a2992cf7c30de5aaea222ec762fc56ad1">PaAlsa_SetRetriesBusy</a> (int retries)</td></tr> <tr class="separator:a2992cf7c30de5aaea222ec762fc56ad1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7517c2e54801c8bd73c2f6db30aeaff9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pa__linux__alsa_8h.html#a7517c2e54801c8bd73c2f6db30aeaff9">PaAlsa_SetLibraryPathName</a> (const char *pathName)</td></tr> <tr class="separator:a7517c2e54801c8bd73c2f6db30aeaff9"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>ALSA-specific PortAudio API extension header file. </p> <p>Definition in file <a class="el" href="pa__linux__alsa_8h_source.html">pa_linux_alsa.h</a>.</p> </div><h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="accc41e7fd89dc0a6163d54a4f25fb242"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PaAlsa_EnableRealtimeScheduling </td> <td>(</td> <td class="paramtype"><a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> * </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>enable</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Instruct whether to enable real-time priority when starting the audio thread.</p> <p>If this is turned on by the stream is started, the audio callback thread will be created with the FIFO scheduling policy, which is suitable for realtime operation. </p> </div> </div> <a class="anchor" id="ac31edeb99ef568fc89418d77bd4ca624"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> PaAlsa_GetStreamInputCard </td> <td>(</td> <td class="paramtype"><a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> * </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"><em>card</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get the ALSA-lib card index of this stream's input device. </p> </div> </div> <a class="anchor" id="a04d7cd7252120eadf0ab3141ba5a7d93"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> PaAlsa_GetStreamOutputCard </td> <td>(</td> <td class="paramtype"><a class="el" href="portaudio_8h.html#a19874734f89958fccf86785490d53b4c">PaStream</a> * </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"><em>card</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get the ALSA-lib card index of this stream's output device. </p> </div> </div> <a class="anchor" id="ac33a394742540a3b6666d77698a72e82"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PaAlsa_InitializeStreamInfo </td> <td>(</td> <td class="paramtype"><a class="el" href="structPaAlsaStreamInfo.html">PaAlsaStreamInfo</a> * </td> <td class="paramname"><em>info</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Initialize host API specific structure, call this before setting relevant attributes. </p> </div> </div> <a class="anchor" id="a7517c2e54801c8bd73c2f6db30aeaff9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PaAlsa_SetLibraryPathName </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pathName</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set the path and name of ALSA library file if PortAudio is configured to load it dynamically (see PA_ALSA_DYNAMIC). This setting will overwrite the default name set by PA_ALSA_PATHNAME define. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pathName</td><td>Full path with filename. Only filename can be used, but dlopen() will lookup default searchable directories (/usr/lib;/usr/local/lib) then. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a76f60d6f1ba6a298c038a9f3a6dccc53"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> PaAlsa_SetNumPeriods </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>numPeriods</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set the number of periods (buffer fragments) to configure devices with.</p> <p>By default the number of periods is 4, this is the lowest number of periods that works well on the author's soundcard. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">numPeriods</td><td>The number of periods. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a2992cf7c30de5aaea222ec762fc56ad1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="portaudio_8h.html#a4949e4a8ef9f9dbe8cbee414ce69841d">PaError</a> PaAlsa_SetRetriesBusy </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>retries</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set the maximum number of times to retry opening busy device (sleeping for a short interval inbetween). </p> </div> </div> </div><!-- contents --> <hr size="1"><address style="text-align: right;"><small>Generated for PortAudio by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>1.8.3.1</small></address> </body> </html>