pa_hostapi.h

Go to the documentation of this file.
00001 #ifndef PA_HOSTAPI_H
00002 #define PA_HOSTAPI_H
00003 /*
00004  * $Id: pa_hostapi.h 1083 2006-08-23 07:30:49Z 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 
00048 #include "portaudio.h"
00049 
00050 #ifdef __cplusplus
00051 extern "C"
00052 {
00053 #endif /* __cplusplus */
00054 
00055 
00061 typedef struct PaUtilPrivatePaFrontHostApiInfo {
00062 
00063 
00064     unsigned long baseDeviceIndex;
00065 }PaUtilPrivatePaFrontHostApiInfo;
00066 
00067 
00076 typedef struct PaUtilHostApiSpecificStreamInfoHeader
00077 {
00078     unsigned long size;             
00079     PaHostApiTypeId hostApiType;    
00080     unsigned long version;          
00081 } PaUtilHostApiSpecificStreamInfoHeader;
00082 
00083 
00084 
00088 typedef struct PaUtilHostApiRepresentation {
00089     PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo;
00090 
00098     PaHostApiInfo info;
00099 
00100     PaDeviceInfo** deviceInfos;
00101 
00107     void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );
00108 
00204     PaError (*OpenStream)( struct PaUtilHostApiRepresentation *hostApi,
00205                            PaStream** stream,
00206                            const PaStreamParameters *inputParameters,
00207                            const PaStreamParameters *outputParameters,
00208                            double sampleRate,
00209                            unsigned long framesPerCallback,
00210                            PaStreamFlags streamFlags,
00211                            PaStreamCallback *streamCallback,
00212                            void *userData );
00213 
00214 
00215     PaError (*IsFormatSupported)( struct PaUtilHostApiRepresentation *hostApi,
00216                                   const PaStreamParameters *inputParameters,
00217                                   const PaStreamParameters *outputParameters,
00218                                   double sampleRate );
00219 } PaUtilHostApiRepresentation;
00220 
00221 
00227 typedef PaError PaUtilHostApiInitializer( PaUtilHostApiRepresentation**, PaHostApiIndex );
00228 
00229 
00237 extern PaUtilHostApiInitializer *paHostApiInitializers[];
00238 
00239 
00245 extern int paDefaultHostApiIndex;
00246 
00247 
00248 #ifdef __cplusplus
00249 }
00250 #endif /* __cplusplus */
00251 #endif /* PA_HOSTAPI_H */

Generated on Fri Nov 17 07:08:00 2006 for PortAudio by  doxygen 1.5.1