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_PULSEAUDIO) || 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_PULSEAUDIO
136#define PA_USE_PULSEAUDIO 0
137#elif (PA_USE_PULSEAUDIO != 0) && (PA_USE_PULSEAUDIO != 1)
138#undef PA_USE_PULSEAUDIO
139#define PA_USE_PULSEAUDIO 1
140#endif
141
142#ifndef PA_USE_SGI
143#define PA_USE_SGI 0
144#elif (PA_USE_SGI != 0) && (PA_USE_SGI != 1)
145#undef PA_USE_SGI
146#define PA_USE_SGI 1
147#endif
148
149#ifndef PA_USE_COREAUDIO
150#define PA_USE_COREAUDIO 0
151#elif (PA_USE_COREAUDIO != 0) && (PA_USE_COREAUDIO != 1)
152#undef PA_USE_COREAUDIO
153#define PA_USE_COREAUDIO 1
154#endif
155
156#ifndef PA_USE_ASIHPI
157#define PA_USE_ASIHPI 0
158#elif (PA_USE_ASIHPI != 0) && (PA_USE_ASIHPI != 1)
159#undef PA_USE_ASIHPI
160#define PA_USE_ASIHPI 1
161#endif
162
163#ifdef __cplusplus
164extern "C"
165{
166#endif /* __cplusplus */
167
168
179
180
195
196
197
203
212
214
220 void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );
221
318 PaStream** stream,
319 const PaStreamParameters *inputParameters,
320 const PaStreamParameters *outputParameters,
321 double sampleRate,
322 unsigned long framesPerCallback,
323 PaStreamFlags streamFlags,
324 PaStreamCallback *streamCallback,
325 void *userData );
326
327
329 const PaStreamParameters *inputParameters,
330 const PaStreamParameters *outputParameters,
331 double sampleRate );
333
334
347
348
364
365
366#ifdef __cplusplus
367}
368#endif /* __cplusplus */
369#endif /* PA_HOSTAPI_H */
PaUtilHostApiInitializer * paHostApiInitializers[]
Definition pa_unix_hostapis.c:61
struct PaUtilHostApiRepresentation PaUtilHostApiRepresentation
struct PaUtilHostApiSpecificStreamInfoHeader PaUtilHostApiSpecificStreamInfoHeader
PaError PaUtilHostApiInitializer(PaUtilHostApiRepresentation **, PaHostApiIndex)
Definition pa_hostapi.h:346
struct PaUtilPrivatePaFrontHostApiInfo PaUtilPrivatePaFrontHostApiInfo
The portable PortAudio API.
void PaStream
Definition portaudio.h:644
unsigned long PaStreamFlags
Definition portaudio.h:662
int PaError
Definition portaudio.h:122
int PaStreamCallback(const void *input, void *output, unsigned long frameCount, const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
Definition portaudio.h:839
PaHostApiTypeId
Definition portaudio.h:278
int PaHostApiIndex
Definition portaudio.h:240
Definition portaudio.h:506
Definition portaudio.h:302
Definition portaudio.h:548
Definition pa_hostapi.h:201
PaDeviceInfo ** deviceInfos
Definition pa_hostapi.h:213
PaError(* IsFormatSupported)(struct PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate)
Definition pa_hostapi.h:328
PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo
Definition pa_hostapi.h:202
void(* Terminate)(struct PaUtilHostApiRepresentation *hostApi)
Definition pa_hostapi.h:220
PaHostApiInfo info
Definition pa_hostapi.h:211
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:317
Definition pa_hostapi.h:190
unsigned long size
Definition pa_hostapi.h:191
unsigned long version
Definition pa_hostapi.h:193
PaHostApiTypeId hostApiType
Definition pa_hostapi.h:192
Definition pa_hostapi.h:174
unsigned long baseDeviceIndex
Definition pa_hostapi.h:177