PaDllEntry.h

00001 
00002 /*
00003  * PortAudio Portable Real-Time Audio Library
00004  * PortAudio DLL Header File
00005  * Latest version available at: http://www.audiomulch.com/portaudio/
00006  *
00007  * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
00008  *
00009  * Permission is hereby granted, free of charge, to any person obtaining
00010  * a copy of this software and associated documentation files
00011  * (the "Software"), to deal in the Software without restriction,
00012  * including without limitation the rights to use, copy, modify, merge,
00013  * publish, distribute, sublicense, and/or sell copies of the Software,
00014  * and to permit persons to whom the Software is furnished to do so,
00015  * subject to the following conditions:
00016  *
00017  * The above copyright notice and this permission notice shall be
00018  * included in all copies or substantial portions of the Software.
00019  *
00020  * Any person wishing to distribute modifications to the Software is
00021  * requested to send the modifications to the original developer so that
00022  * they can be incorporated into the canonical version.
00023  *
00024  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00025  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00026  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00027  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
00028  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00029  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00030  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00031  *
00032  */
00033 
00034 // changed by zplane.developement in order to generate a DLL
00035 
00036 #ifndef __PADLLENTRY_HEADER_INCLUDED__
00037 
00038 #define __PADLLENTRY_HEADER_INCLUDED__
00039 
00040 typedef int PaError;
00041 typedef enum {
00042     paNoError = 0,
00043 
00044     paHostError = -10000,
00045     paInvalidChannelCount,
00046     paInvalidSampleRate,
00047     paInvalidDeviceId,
00048     paInvalidFlag,
00049     paSampleFormatNotSupported,
00050     paBadIODeviceCombination,
00051     paInsufficientMemory,
00052     paBufferTooBig,
00053     paBufferTooSmall,
00054     paNullCallback,
00055     paBadStreamPtr,
00056     paTimedOut,
00057     paInternalError
00058 } PaErrorNum;
00059 
00060 typedef unsigned long PaSampleFormat;
00061 #define paFloat32      ((PaSampleFormat) (1<<0)) /*always available*/
00062 #define paInt16        ((PaSampleFormat) (1<<1)) /*always available*/
00063 #define paInt32        ((PaSampleFormat) (1<<2)) /*always available*/
00064 #define paInt24        ((PaSampleFormat) (1<<3))
00065 #define paPackedInt24  ((PaSampleFormat) (1<<4))
00066 #define paInt8         ((PaSampleFormat) (1<<5))
00067 #define paUInt8        ((PaSampleFormat) (1<<6))    /* unsigned 8 bit, 128 is "ground" */
00068 #define paCustomFormat ((PaSampleFormat) (1<<16))
00069 
00070 
00071 typedef int PaDeviceID;
00072 #define paNoDevice -1
00073 
00074 typedef struct
00075 {
00076     int structVersion;
00077     const char *name;
00078     int maxInputChannels;
00079     int maxOutputChannels;
00080     /* Number of discrete rates, or -1 if range supported. */
00081     int numSampleRates;
00082     /* Array of supported sample rates, or {min,max} if range supported. */
00083     const double *sampleRates;
00084     PaSampleFormat nativeSampleFormats;
00085 }
00086 PaDeviceInfo;
00087 
00088 
00089 typedef double PaTimestamp;
00090 
00091 
00092 typedef int (PortAudioCallback)(
00093     void *inputBuffer, void *outputBuffer,
00094     unsigned long framesPerBuffer,
00095     PaTimestamp outTime, void *userData );
00096 
00097 
00098 #define   paNoFlag      (0)
00099 #define   paClipOff     (1<<0)   /* disable default clipping of out of range samples */
00100 #define   paDitherOff   (1<<1)   /* disable default dithering */
00101 #define   paPlatformSpecificFlags (0x00010000)
00102 typedef   unsigned long PaStreamFlags;
00103 
00104 typedef void PortAudioStream;
00105 #define PaStream PortAudioStream
00106 
00107 extern  PaError (__cdecl* Pa_Initialize)( void );
00108 
00109 
00110 
00111 extern  PaError (__cdecl* Pa_Terminate)( void );
00112 
00113 
00114 extern  long (__cdecl* Pa_GetHostError)( void );
00115 
00116 
00117 extern  const char* (__cdecl* Pa_GetErrorText)( PaError );
00118 
00119 
00120 
00121 extern  int (__cdecl* Pa_CountDevices)(void);
00122 
00123 extern  PaDeviceID (__cdecl* Pa_GetDefaultInputDeviceID)( void );
00124 
00125 extern  PaDeviceID (__cdecl* Pa_GetDefaultOutputDeviceID)( void );
00126 
00127 
00128 extern  const PaDeviceInfo* (__cdecl* Pa_GetDeviceInfo)( PaDeviceID);
00129 
00130 
00131 
00132 extern  PaError (__cdecl* Pa_OpenStream)(
00133         PortAudioStream ** ,
00134         PaDeviceID ,
00135         int ,
00136         PaSampleFormat ,
00137         void *,
00138         PaDeviceID ,
00139         int ,
00140         PaSampleFormat ,
00141         void *,
00142         double ,
00143         unsigned long ,
00144         unsigned long ,
00145         unsigned long ,
00146         PortAudioCallback *,
00147         void * );
00148 
00149 
00150 
00151 extern  PaError (__cdecl* Pa_OpenDefaultStream)( PortAudioStream** stream,
00152             int numInputChannels,
00153             int numOutputChannels,
00154             PaSampleFormat sampleFormat,
00155             double sampleRate,
00156             unsigned long framesPerBuffer,
00157             unsigned long numberOfBuffers,
00158             PortAudioCallback *callback,
00159             void *userData );
00160 
00161 
00162 extern  PaError (__cdecl* Pa_CloseStream)( PortAudioStream* );
00163 
00164 
00165 extern  PaError (__cdecl* Pa_StartStream)( PortAudioStream *stream );
00166 
00167 extern  PaError (__cdecl* Pa_StopStream)( PortAudioStream *stream );
00168 
00169 extern  PaError (__cdecl* Pa_AbortStream)( PortAudioStream *stream );
00170 
00171 extern  PaError (__cdecl* Pa_StreamActive)( PortAudioStream *stream );
00172 
00173 extern  PaTimestamp (__cdecl* Pa_StreamTime)( PortAudioStream *stream );
00174 
00175 extern  double (__cdecl* Pa_GetCPULoad)( PortAudioStream* stream );
00176 
00177 extern  int (__cdecl* Pa_GetMinNumBuffers)( int framesPerBuffer, double sampleRate );
00178 
00179 extern  void (__cdecl* Pa_Sleep)( long msec );
00180 
00181 extern  PaError (__cdecl* Pa_GetSampleSize)( PaSampleFormat format );
00182 
00183 #endif // __PADLLENTRY_HEADER_INCLUDED__
00184 

Generated on Mon Jun 5 10:20:43 2006 for Intelligence.kdevelop by  doxygen 1.4.6