Merge branch 'master' of https://github.com/thestk/rtaudio
[rtaudio-cdist.git] / doc / doxygen / compiling.txt
1 /*! \page compiling Debugging & Compiling
2
3 \section debug Debugging
4
5 If you are having problems getting RtAudio to run on your system, make sure to pass a value of \e true to the RtAudio::showWarnings() function (this is the default setting).  A variety of warning messages will be displayed which may help in determining the problem.  Also, try using the programs included in the <tt>tests</tt> directory.  The program <tt>audioprobe</tt> displays the queried capabilities of all hardware devices found for all APIs compiled.  When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__.
6
7 \section compile Compiling
8
9 In order to compile RtAudio for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:
10 <P>
11
12 <TABLE BORDER=2 COLS=5 WIDTH="100%">
13 <TR BGCOLOR="beige">
14   <TD WIDTH="5%"><B>OS:</B></TD>
15   <TD WIDTH="5%"><B>Audio API:</B></TD>
16   <TD WIDTH="5%"><B>C++ Class:</B></TD>
17   <TD WIDTH="5%"><B>Preprocessor Definition:</B></TD>
18   <TD WIDTH="5%"><B>Library or Framework:</B></TD>
19   <TD><B>Example Compiler Statement:</B></TD>
20 </TR>
21 <TR>
22   <TD>Linux</TD>
23   <TD>ALSA</TD>
24   <TD>RtApiAlsa</TD>
25   <TD>__LINUX_ALSA__</TD>
26   <TD><TT>asound, pthread</TT></TD>
27   <TD><TT>g++ -Wall -D__LINUX_ALSA__ -o audioprobe audioprobe.cpp RtAudio.cpp -lasound -lpthread</TT></TD>
28 </TR>
29 <TR>
30   <TD>Linux</TD>
31   <TD>PulseAudio</TD>
32   <TD>RtApiPulse</TD>
33   <TD>__LINUX_PULSE__</TD>
34   <TD><TT>pthread</TT></TD>
35   <TD><TT>g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread -lpulse-simple -lpulse</TT></TD>
36 </TR>
37 <TR>
38   <TD>Linux</TD>
39   <TD>OSS</TD>
40   <TD>RtApiOss</TD>
41   <TD>__LINUX_OSS__</TD>
42   <TD><TT>pthread</TT></TD>
43   <TD><TT>g++ -Wall -D__LINUX_OSS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread</TT></TD>
44 </TR>
45 <TR>
46   <TD>Linux or Macintosh OS-X</TD>
47   <TD>Jack Audio Server</TD>
48   <TD>RtApiJack</TD>
49   <TD>__UNIX_JACK__</TD>
50   <TD><TT>jack, pthread</TT></TD>
51   <TD><TT>g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp $(pkg-config --cflags --libs jack) -lpthread</TT></TD>
52 </TR>
53
54 <TR>
55   <TD>Macintosh OS-X</TD>
56   <TD>CoreAudio</TD>
57   <TD>RtApiCore</TD>
58   <TD>__MACOSX_CORE__</TD>
59   <TD><TT>pthread, CoreAudio</TT></TD>
60   <TD><TT>g++ -Wall -D__MACOSX_CORE__ -o audioprobe audioprobe.cpp RtAudio.cpp -framework CoreAudio -framework CoreFoundation -lpthread</TT></TD>
61 </TR>
62 <TR>
63   <TD>Windows</TD>
64   <TD>Direct Sound</TD>
65   <TD>RtApiDs</TD>
66   <TD>__WINDOWS_DS__</TD>
67   <TD><TT>dsound.lib (ver. 5.0 or higher), multithreaded</TT></TD>
68   <TD>MinGW: <TT>g++ -Wall -D__WINDOWS_DS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lole32 -lwinmm -ldsound</TT></TD>
69 </TR>
70 <TR>
71   <TD>Windows</TD>
72   <TD>ASIO</TD>
73   <TD>RtApiAsio</TD>
74   <TD>__WINDOWS_ASIO__</TD>
75   <TD><I>various ASIO header and source files</I></TD>
76   <TD>MinGW: <TT>g++ -Wall -D__WINDOWS_ASIO__ -Iinclude -o audioprobe audioprobe.cpp RtAudio.cpp asio.cpp asiolist.cpp asiodrivers.cpp iasiothiscallresolver.cpp -lole32</TT></TD>
77 </TR>
78 <TR>
79   <TD>Windows</TD>
80   <TD>WASAPI</TD>
81   <TD>RtApiWasapi</TD>
82   <TD>__WINDOWS_WASAPI__</TD>
83   <TD>MinGW: <TT>FunctionDiscoveryKeys_devpkey.h, lksuser, lmfplat, lmfuuid, lwmcodecdspuuid, lwinmm, lole32</TT></TD>
84   <TD>MinGW: <TT>g++ -Wall -D__WINDOWS_WASAPI__ -Iinclude -o audioprobe audioprobe.cpp RtAudio.cpp -lole32 -lwinmm -lksuser -lmfplat -lmfuuid -lwmcodecdspuuid</TT></TD>
85 </TR>
86 </TABLE>
87 <P>
88
89 The example compiler statements above could be used to compile the <TT>audioprobe.cpp</TT> example file, assuming that <TT>audioprobe.cpp</TT>, <TT>RtAudio.h</TT>, <TT>RtAudio.cpp</TT> and any other necessary files all exist in the same directory or the include directory.
90
91
92 */