cannam@89
|
1 #ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
|
cannam@89
|
2 #define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
|
cannam@89
|
3
|
cannam@89
|
4 // ---------------------------------------------------------------------------------------
|
cannam@89
|
5
|
cannam@89
|
6 //////
|
cannam@89
|
7 /// @mainpage PortAudioCpp
|
cannam@89
|
8 ///
|
cannam@89
|
9 /// <h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>
|
cannam@89
|
10 /// <h2>PortAudio</h2>
|
cannam@89
|
11 /// <p>
|
cannam@89
|
12 /// PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking
|
cannam@89
|
13 /// style input and output, deals with sample data format conversions, dithering and much more. There are a large number
|
cannam@89
|
14 /// of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic)
|
cannam@89
|
15 /// ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix
|
cannam@89
|
16 /// AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is
|
cannam@89
|
17 /// still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming
|
cannam@89
|
18 /// languages.
|
cannam@89
|
19 /// </p>
|
cannam@89
|
20 /// <h2>PortAudioCpp</h2>
|
cannam@89
|
21 /// <p>
|
cannam@89
|
22 /// Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward
|
cannam@89
|
23 /// as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating
|
cannam@89
|
24 /// PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio
|
cannam@89
|
25 /// into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and
|
cannam@89
|
26 /// no additional features were added except for some `convenience methods'.
|
cannam@89
|
27 /// </p>
|
cannam@89
|
28 /// <p>
|
cannam@89
|
29 /// PortAudioCpp's main features are:
|
cannam@89
|
30 /// <ul>
|
cannam@89
|
31 /// <li>Structured object model.</li>
|
cannam@89
|
32 /// <li>C++ exception handling instead of C-style error return codes.</li>
|
cannam@89
|
33 /// <li>Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes
|
cannam@89
|
34 /// derived from a given interface.</li>
|
cannam@89
|
35 /// <li>STL compliant iterators to host APIs and devices.</li>
|
cannam@89
|
36 /// <li>Some additional convenience functions to more easily set up and use PortAudio.</li>
|
cannam@89
|
37 /// </ul>
|
cannam@89
|
38 /// </p>
|
cannam@89
|
39 /// <p>
|
cannam@89
|
40 /// PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot
|
cannam@89
|
41 /// from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the
|
cannam@89
|
42 /// examples can easily be modified to compile without needing ASIO.
|
cannam@89
|
43 /// </p>
|
cannam@89
|
44 /// <p>
|
cannam@89
|
45 /// Supported platforms:
|
cannam@89
|
46 /// <ul>
|
cannam@89
|
47 /// <li>Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).</li>
|
cannam@89
|
48 /// <li>GNU G++ 2.95 and G++ 3.3.</li>
|
cannam@89
|
49 /// </ul>
|
cannam@89
|
50 /// Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.
|
cannam@89
|
51 /// </p>
|
cannam@89
|
52 /// <p>
|
cannam@89
|
53 /// This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the
|
cannam@89
|
54 /// concepts used, please consult the PortAudio documentation.
|
cannam@89
|
55 /// </p>
|
cannam@89
|
56 /// <p>
|
cannam@89
|
57 /// PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided
|
cannam@89
|
58 /// GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and
|
cannam@89
|
59 /// warranty as PortAudio. See <a href="http://www.portaudio.com/license.html">the PortAudio license</a> for more details.
|
cannam@89
|
60 /// </p>
|
cannam@89
|
61 /// <h2>Links</h2>
|
cannam@89
|
62 /// <p>
|
cannam@89
|
63 /// <a href="http://www.portaudio.com/">Official PortAudio site.</a><br>
|
cannam@89
|
64 /// </p>
|
cannam@89
|
65 //////
|
cannam@89
|
66
|
cannam@89
|
67 // ---------------------------------------------------------------------------------------
|
cannam@89
|
68
|
cannam@89
|
69 //////
|
cannam@89
|
70 /// @namespace portaudio
|
cannam@89
|
71 ///
|
cannam@89
|
72 /// To avoid name collision, everything in PortAudioCpp is in the portaudio
|
cannam@89
|
73 /// namespace. If this name is too long it's usually pretty safe to use an
|
cannam@89
|
74 /// alias like ``namespace pa = portaudio;''.
|
cannam@89
|
75 //////
|
cannam@89
|
76
|
cannam@89
|
77 // ---------------------------------------------------------------------------------------
|
cannam@89
|
78
|
cannam@89
|
79 //////
|
cannam@89
|
80 /// @file PortAudioCpp.hxx
|
cannam@89
|
81 /// An include-all header file (for lazy programmers and using pre-compiled headers).
|
cannam@89
|
82 //////
|
cannam@89
|
83
|
cannam@89
|
84 // ---------------------------------------------------------------------------------------
|
cannam@89
|
85
|
cannam@89
|
86 #include "portaudio.h"
|
cannam@89
|
87
|
cannam@89
|
88 #include "portaudiocpp/AutoSystem.hxx"
|
cannam@89
|
89 #include "portaudiocpp/BlockingStream.hxx"
|
cannam@89
|
90 #include "portaudiocpp/CallbackInterface.hxx"
|
cannam@89
|
91 #include "portaudiocpp/CallbackStream.hxx"
|
cannam@89
|
92 #include "portaudiocpp/CFunCallbackStream.hxx"
|
cannam@89
|
93 #include "portaudiocpp/CppFunCallbackStream.hxx"
|
cannam@89
|
94 #include "portaudiocpp/Device.hxx"
|
cannam@89
|
95 #include "portaudiocpp/Exception.hxx"
|
cannam@89
|
96 #include "portaudiocpp/HostApi.hxx"
|
cannam@89
|
97 #include "portaudiocpp/InterfaceCallbackStream.hxx"
|
cannam@89
|
98 #include "portaudiocpp/MemFunCallbackStream.hxx"
|
cannam@89
|
99 #include "portaudiocpp/SampleDataFormat.hxx"
|
cannam@89
|
100 #include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
|
cannam@89
|
101 #include "portaudiocpp/Stream.hxx"
|
cannam@89
|
102 #include "portaudiocpp/StreamParameters.hxx"
|
cannam@89
|
103 #include "portaudiocpp/System.hxx"
|
cannam@89
|
104 #include "portaudiocpp/SystemDeviceIterator.hxx"
|
cannam@89
|
105 #include "portaudiocpp/SystemHostApiIterator.hxx"
|
cannam@89
|
106
|
cannam@89
|
107 // ---------------------------------------------------------------------------------------
|
cannam@89
|
108
|
cannam@89
|
109 #endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
|