PortAudio  2.0
pa_hostapi.h
Go to the documentation of this file.
1 #ifndef PA_HOSTAPI_H
2 #define PA_HOSTAPI_H
3 /*
4  * $Id$
5  * Portable Audio I/O Library
6  * host api representation
7  *
8  * Based on the Open Source API proposed by Ross Bencina
9  * Copyright (c) 1999-2008 Ross Bencina, Phil Burk
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining
12  * a copy of this software and associated documentation files
13  * (the "Software"), to deal in the Software without restriction,
14  * including without limitation the rights to use, copy, modify, merge,
15  * publish, distribute, sublicense, and/or sell copies of the Software,
16  * and to permit persons to whom the Software is furnished to do so,
17  * subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be
20  * included in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
26  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
27  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29  */
30 
31 /*
32  * The text above constitutes the entire PortAudio license; however,
33  * the PortAudio community also makes the following non-binding requests:
34  *
35  * Any person wishing to distribute modifications to the Software is
36  * requested to send the modifications to the original developer so that
37  * they can be incorporated into the canonical version. It is also
38  * requested that these non-binding requests be included along with the
39  * license above.
40  */
41 
49 #include "portaudio.h"
50 
63 #ifndef PA_USE_SKELETON
64 #define PA_USE_SKELETON 0
65 #elif (PA_USE_SKELETON != 0) && (PA_USE_SKELETON != 1)
66 #undef PA_USE_SKELETON
67 #define PA_USE_SKELETON 1
68 #endif
69 
70 #if defined(PA_NO_ASIO) || defined(PA_NO_DS) || defined(PA_NO_WMME) || defined(PA_NO_WASAPI) || defined(PA_NO_WDMKS)
71 #error "Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead"
72 #endif
73 
74 #ifndef PA_USE_ASIO
75 #define PA_USE_ASIO 0
76 #elif (PA_USE_ASIO != 0) && (PA_USE_ASIO != 1)
77 #undef PA_USE_ASIO
78 #define PA_USE_ASIO 1
79 #endif
80 
81 #ifndef PA_USE_DS
82 #define PA_USE_DS 0
83 #elif (PA_USE_DS != 0) && (PA_USE_DS != 1)
84 #undef PA_USE_DS
85 #define PA_USE_DS 1
86 #endif
87 
88 #ifndef PA_USE_WMME
89 #define PA_USE_WMME 0
90 #elif (PA_USE_WMME != 0) && (PA_USE_WMME != 1)
91 #undef PA_USE_WMME
92 #define PA_USE_WMME 1
93 #endif
94 
95 #ifndef PA_USE_WASAPI
96 #define PA_USE_WASAPI 0
97 #elif (PA_USE_WASAPI != 0) && (PA_USE_WASAPI != 1)
98 #undef PA_USE_WASAPI
99 #define PA_USE_WASAPI 1
100 #endif
101 
102 #ifndef PA_USE_WDMKS
103 #define PA_USE_WDMKS 0
104 #elif (PA_USE_WDMKS != 0) && (PA_USE_WDMKS != 1)
105 #undef PA_USE_WDMKS
106 #define PA_USE_WDMKS 1
107 #endif
108 
109 /* Set default values for Unix based APIs. */
110 #if defined(PA_NO_OSS) || defined(PA_NO_ALSA) || defined(PA_NO_JACK) || defined(PA_NO_COREAUDIO) || defined(PA_NO_SGI) || defined(PA_NO_ASIHPI)
111 #error "Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead"
112 #endif
113 
114 #ifndef PA_USE_OSS
115 #define PA_USE_OSS 0
116 #elif (PA_USE_OSS != 0) && (PA_USE_OSS != 1)
117 #undef PA_USE_OSS
118 #define PA_USE_OSS 1
119 #endif
120 
121 #ifndef PA_USE_ALSA
122 #define PA_USE_ALSA 0
123 #elif (PA_USE_ALSA != 0) && (PA_USE_ALSA != 1)
124 #undef PA_USE_ALSA
125 #define PA_USE_ALSA 1
126 #endif
127 
128 #ifndef PA_USE_JACK
129 #define PA_USE_JACK 0
130 #elif (PA_USE_JACK != 0) && (PA_USE_JACK != 1)
131 #undef PA_USE_JACK
132 #define PA_USE_JACK 1
133 #endif
134 
135 #ifndef PA_USE_SGI
136 #define PA_USE_SGI 0
137 #elif (PA_USE_SGI != 0) && (PA_USE_SGI != 1)
138 #undef PA_USE_SGI
139 #define PA_USE_SGI 1
140 #endif
141 
142 #ifndef PA_USE_COREAUDIO
143 #define PA_USE_COREAUDIO 0
144 #elif (PA_USE_COREAUDIO != 0) && (PA_USE_COREAUDIO != 1)
145 #undef PA_USE_COREAUDIO
146 #define PA_USE_COREAUDIO 1
147 #endif
148 
149 #ifndef PA_USE_ASIHPI
150 #define PA_USE_ASIHPI 0
151 #elif (PA_USE_ASIHPI != 0) && (PA_USE_ASIHPI != 1)
152 #undef PA_USE_ASIHPI
153 #define PA_USE_ASIHPI 1
154 #endif
155 
156 #ifdef __cplusplus
157 extern "C"
158 {
159 #endif /* __cplusplus */
160 
161 
168 
169 
170  unsigned long baseDeviceIndex;
172 
173 
183 {
184  unsigned long size;
186  unsigned long version;
188 
189 
190 
196 
205 
207 
213  void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );
214 
311  PaStream** stream,
312  const PaStreamParameters *inputParameters,
313  const PaStreamParameters *outputParameters,
314  double sampleRate,
315  unsigned long framesPerCallback,
316  PaStreamFlags streamFlags,
317  PaStreamCallback *streamCallback,
318  void *userData );
319 
320 
322  const PaStreamParameters *inputParameters,
323  const PaStreamParameters *outputParameters,
324  double sampleRate );
326 
327 
340 
341 
357 
358 
359 #ifdef __cplusplus
360 }
361 #endif /* __cplusplus */
362 #endif /* PA_HOSTAPI_H */
PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo
Definition: pa_hostapi.h:195
int PaHostApiIndex
Definition: portaudio.h:238
PaError PaUtilHostApiInitializer(PaUtilHostApiRepresentation **, PaHostApiIndex)
Definition: pa_hostapi.h:339
void PaStream
Definition: portaudio.h:635
struct PaUtilPrivatePaFrontHostApiInfo PaUtilPrivatePaFrontHostApiInfo
Definition: portaudio.h:500
unsigned long size
Definition: pa_hostapi.h:184
int PaStreamCallback(const void *input, void *output, unsigned long frameCount, const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
Definition: portaudio.h:830
Definition: portaudio.h:296
PaDeviceInfo ** deviceInfos
Definition: pa_hostapi.h:206
The portable PortAudio API.
Definition: pa_hostapi.h:182
unsigned long PaStreamFlags
Definition: portaudio.h:653
int PaError
Definition: portaudio.h:121
PaHostApiTypeId
Definition: portaudio.h:275
unsigned long version
Definition: pa_hostapi.h:186
void(* Terminate)(struct PaUtilHostApiRepresentation *hostApi)
Definition: pa_hostapi.h:213
Definition: portaudio.h:538
PaError(* OpenStream)(struct PaUtilHostApiRepresentation *hostApi, PaStream **stream, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate, unsigned long framesPerCallback, PaStreamFlags streamFlags, PaStreamCallback *streamCallback, void *userData)
Definition: pa_hostapi.h:310
PaHostApiTypeId hostApiType
Definition: pa_hostapi.h:185
PaUtilHostApiInitializer * paHostApiInitializers[]
Definition: pa_unix_hostapis.c:58
Definition: pa_hostapi.h:167
PaError(* IsFormatSupported)(struct PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate)
Definition: pa_hostapi.h:321
PaHostApiInfo info
Definition: pa_hostapi.h:204
struct PaUtilHostApiSpecificStreamInfoHeader PaUtilHostApiSpecificStreamInfoHeader
Definition: pa_hostapi.h:194
struct PaUtilHostApiRepresentation PaUtilHostApiRepresentation
unsigned long baseDeviceIndex
Definition: pa_hostapi.h:170