00001 #ifndef PA_HOSTAPI_H
00002 #define PA_HOSTAPI_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00049 #include "portaudio.h"
00050
00063 #ifndef PA_USE_SKELETON
00064 #define PA_USE_SKELETON 0
00065 #elif (PA_USE_SKELETON != 0) && (PA_USE_SKELETON != 1)
00066 #undef PA_USE_SKELETON
00067 #define PA_USE_SKELETON 1
00068 #endif
00069
00070 #if defined(PA_NO_ASIO) || defined(PA_NO_DS) || defined(PA_NO_WMME) || defined(PA_NO_WASAPI) || defined(PA_NO_WDMKS)
00071 #error "Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead"
00072 #endif
00073
00074 #ifndef PA_USE_ASIO
00075 #define PA_USE_ASIO 0
00076 #elif (PA_USE_ASIO != 0) && (PA_USE_ASIO != 1)
00077 #undef PA_USE_ASIO
00078 #define PA_USE_ASIO 1
00079 #endif
00080
00081 #ifndef PA_USE_DS
00082 #define PA_USE_DS 0
00083 #elif (PA_USE_DS != 0) && (PA_USE_DS != 1)
00084 #undef PA_USE_DS
00085 #define PA_USE_DS 1
00086 #endif
00087
00088 #ifndef PA_USE_WMME
00089 #define PA_USE_WMME 0
00090 #elif (PA_USE_WMME != 0) && (PA_USE_WMME != 1)
00091 #undef PA_USE_WMME
00092 #define PA_USE_WMME 1
00093 #endif
00094
00095 #ifndef PA_USE_WASAPI
00096 #define PA_USE_WASAPI 0
00097 #elif (PA_USE_WASAPI != 0) && (PA_USE_WASAPI != 1)
00098 #undef PA_USE_WASAPI
00099 #define PA_USE_WASAPI 1
00100 #endif
00101
00102 #ifndef PA_USE_WDMKS
00103 #define PA_USE_WDMKS 0
00104 #elif (PA_USE_WDMKS != 0) && (PA_USE_WDMKS != 1)
00105 #undef PA_USE_WDMKS
00106 #define PA_USE_WDMKS 1
00107 #endif
00108
00109 #ifdef __cplusplus
00110 extern "C"
00111 {
00112 #endif
00113
00114
00120 typedef struct PaUtilPrivatePaFrontHostApiInfo {
00121
00122
00123 unsigned long baseDeviceIndex;
00124 }PaUtilPrivatePaFrontHostApiInfo;
00125
00126
00135 typedef struct PaUtilHostApiSpecificStreamInfoHeader
00136 {
00137 unsigned long size;
00138 PaHostApiTypeId hostApiType;
00139 unsigned long version;
00140 } PaUtilHostApiSpecificStreamInfoHeader;
00141
00142
00143
00147 typedef struct PaUtilHostApiRepresentation {
00148 PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo;
00149
00157 PaHostApiInfo info;
00158
00159 PaDeviceInfo** deviceInfos;
00160
00166 void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );
00167
00263 PaError (*OpenStream)( struct PaUtilHostApiRepresentation *hostApi,
00264 PaStream** stream,
00265 const PaStreamParameters *inputParameters,
00266 const PaStreamParameters *outputParameters,
00267 double sampleRate,
00268 unsigned long framesPerCallback,
00269 PaStreamFlags streamFlags,
00270 PaStreamCallback *streamCallback,
00271 void *userData );
00272
00273
00274 PaError (*IsFormatSupported)( struct PaUtilHostApiRepresentation *hostApi,
00275 const PaStreamParameters *inputParameters,
00276 const PaStreamParameters *outputParameters,
00277 double sampleRate );
00278 } PaUtilHostApiRepresentation;
00279
00280
00292 typedef PaError PaUtilHostApiInitializer( PaUtilHostApiRepresentation**, PaHostApiIndex );
00293
00294
00302 extern PaUtilHostApiInitializer *paHostApiInitializers[];
00303
00304
00310 extern int paDefaultHostApiIndex;
00311
00312
00313 #ifdef __cplusplus
00314 }
00315 #endif
00316 #endif