PortAudio
2.0
|
00001 #ifndef PA_HOSTAPI_H 00002 #define PA_HOSTAPI_H 00003 /* 00004 * $Id: pa_hostapi.h 1097 2006-08-26 08:27:53Z rossb $ 00005 * Portable Audio I/O Library 00006 * host api representation 00007 * 00008 * Based on the Open Source API proposed by Ross Bencina 00009 * Copyright (c) 1999-2002 Ross Bencina, Phil Burk 00010 * 00011 * Permission is hereby granted, free of charge, to any person obtaining 00012 * a copy of this software and associated documentation files 00013 * (the "Software"), to deal in the Software without restriction, 00014 * including without limitation the rights to use, copy, modify, merge, 00015 * publish, distribute, sublicense, and/or sell copies of the Software, 00016 * and to permit persons to whom the Software is furnished to do so, 00017 * subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be 00020 * included in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00023 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00024 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00025 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 00026 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00027 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00028 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00029 */ 00030 00031 /* 00032 * The text above constitutes the entire PortAudio license; however, 00033 * the PortAudio community also makes the following non-binding requests: 00034 * 00035 * Any person wishing to distribute modifications to the Software is 00036 * requested to send the modifications to the original developer so that 00037 * they can be incorporated into the canonical version. It is also 00038 * requested that these non-binding requests be included along with the 00039 * license above. 00040 */ 00041 00050 #include "portaudio.h" 00051 00052 #ifdef __cplusplus 00053 extern "C" 00054 { 00055 #endif /* __cplusplus */ 00056 00057 00063 typedef struct PaUtilPrivatePaFrontHostApiInfo { 00064 00065 00066 unsigned long baseDeviceIndex; 00067 }PaUtilPrivatePaFrontHostApiInfo; 00068 00069 00078 typedef struct PaUtilHostApiSpecificStreamInfoHeader 00079 { 00080 unsigned long size; 00081 PaHostApiTypeId hostApiType; 00082 unsigned long version; 00083 } PaUtilHostApiSpecificStreamInfoHeader; 00084 00085 00086 00090 typedef struct PaUtilHostApiRepresentation { 00091 PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo; 00092 00100 PaHostApiInfo info; 00101 00102 PaDeviceInfo** deviceInfos; 00103 00109 void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi ); 00110 00206 PaError (*OpenStream)( struct PaUtilHostApiRepresentation *hostApi, 00207 PaStream** stream, 00208 const PaStreamParameters *inputParameters, 00209 const PaStreamParameters *outputParameters, 00210 double sampleRate, 00211 unsigned long framesPerCallback, 00212 PaStreamFlags streamFlags, 00213 PaStreamCallback *streamCallback, 00214 void *userData ); 00215 00216 00217 PaError (*IsFormatSupported)( struct PaUtilHostApiRepresentation *hostApi, 00218 const PaStreamParameters *inputParameters, 00219 const PaStreamParameters *outputParameters, 00220 double sampleRate ); 00221 } PaUtilHostApiRepresentation; 00222 00223 00229 typedef PaError PaUtilHostApiInitializer( PaUtilHostApiRepresentation**, PaHostApiIndex ); 00230 00231 00239 extern PaUtilHostApiInitializer *paHostApiInitializers[]; 00240 00241 00247 extern int paDefaultHostApiIndex; 00248 00249 00250 #ifdef __cplusplus 00251 } 00252 #endif /* __cplusplus */ 00253 #endif /* PA_HOSTAPI_H */