00001
00002
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 #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))
00062 #define paInt16 ((PaSampleFormat) (1<<1))
00063 #define paInt32 ((PaSampleFormat) (1<<2))
00064 #define paInt24 ((PaSampleFormat) (1<<3))
00065 #define paPackedInt24 ((PaSampleFormat) (1<<4))
00066 #define paInt8 ((PaSampleFormat) (1<<5))
00067 #define paUInt8 ((PaSampleFormat) (1<<6))
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
00081 int numSampleRates;
00082
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)
00100 #define paDitherOff (1<<1)
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