This file is indexed.

/usr/share/doc/portaudio19-doc/doc/html/compile_linux.html is in portaudio19-doc 19+svn20140130-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!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.6"/>
<title>PortAudio: Building Portaudio for Linux</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
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Building Portaudio for Linux </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><em>Note: this page has not been reviewed, and may contain errors.</em></p>
<h1><a class="anchor" id="comp_linux1"></a>
Installing ALSA Development Kit</h1>
<p>The OSS sound API is very old and not well supported. It is recommended that you use the ALSA sound API. The PortAudio configure script will look for the ALSA SDK. You can install the ALSA SDK on Ubuntu using:</p>
<div class="fragment"><div class="line">sudo apt-<span class="keyword">get</span> install libasound-dev</div>
</div><!-- fragment --><p>You might need to use yum, or some other package manager, instead of apt-get on your machine. If you do not install ALSA then you might get a message when testing that says you have no audio devices.</p>
<p>You can find out more about ALSA here: <a href="http://www.alsa-project.org/">http://www.alsa-project.org/</a></p>
<h1><a class="anchor" id="comp_linux2"></a>
Configuring and Compiling PortAudio</h1>
<p>You can build PortAudio in Linux Environments using the standard configure/make tools:</p>
<div class="fragment"><div class="line">./configure &amp;&amp; make</div>
</div><!-- fragment --><p>That will build PortAudio using Jack, ALSA and OSS in whatever combination they are found on your system. For example, if you have Jack and OSS but not ALSA, it will build using Jack and OSS but not ALSA. This step also builds a number of tests, which can be found in the bin directory of PortAudio. It's a good idea to run some of these tests to make sure PortAudio is working correctly.</p>
<h1><a class="anchor" id="comp_linux3"></a>
Using PortAudio in your Projects</h1>
<p>To use PortAudio in your apps, you can simply install the .so files:</p>
<div class="fragment"><div class="line">make install</div>
</div><!-- fragment --><p>Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:</p>
<div class="fragment"><div class="line">cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR</div>
</div><!-- fragment --><p>You may also need to copy <a class="el" href="portaudio_8h.html" title="The portable PortAudio API. ">portaudio.h</a>, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the approriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:</p>
<div class="fragment"><div class="line">gcc -lrt -lasound -ljack -lpthread -o YOUR_BINARY main.c libportaudio.a</div>
</div><!-- fragment --><h1><a class="anchor" id="comp_linux4"></a>
Linux Extensions</h1>
<p>Note that the ALSA PortAudio back-end adds a few extensions to the standard API that you may take advantage of. To use these functions be sure to include the <a class="el" href="pa__linux__alsa_8h.html" title="ALSA-specific PortAudio API extension header file. ">pa_linux_alsa.h</a> file found in the include file in the PortAudio folder. This file contains further documentation on the following functions:</p>
<p>PaAlsaStreamInfo/PaAlsa_InitializeStreamInfo:: Objects of the !PaAlsaStreamInfo type may be used for the !hostApiSpecificStreamInfo attribute of a !PaStreamParameters object, in order to specify the name of an ALSA device to open directly. Specify the device via !PaAlsaStreamInfo.deviceString, after initializing the object with PaAlsa_InitializeStreamInfo.</p>
<p>PaAlsa_EnableRealtimeScheduling:: PA ALSA supports real-time scheduling of the audio callback thread (using the FIFO pthread scheduling policy), via the extension PaAlsa_EnableRealtimeScheduling. Call this on the stream before starting it with the <em>enableScheduling</em> parameter set to true or false, to enable or disable this behaviour respectively.</p>
<p>PaAlsa_GetStreamInputCard:: Use this function to get the ALSA-lib card index of the stream's input device.</p>
<p>PaAlsa_GetStreamOutputCard:: Use this function to get the ALSA-lib card index of the stream's output device.</p>
<p>Of particular importance is PaAlsa_EnableRealtimeScheduling, which allows ALSA to run at a high priority to prevent ordinary processes on the system from preempting audio playback. Without this, low latency audio playback will be irregular and will contain frequent drop-outs.</p>
<h1><a class="anchor" id="comp_linux5"></a>
Linux Debugging</h1>
<p>Eliot Blennerhassett writes:</p>
<p>On linux build, use e.g. "libtool gdb bin/patest_sine8" to debug that program. This is because on linux bin/patest_sine8 is a libtool shell script that wraps bin/.libs/patest_sine8 and allows it to find the appropriate libraries within the build tree. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Feb 15 2014 23:28:26 for PortAudio by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>