25 #define EAXAC3_API __declspec(dllexport)
27 #define EAXAC3_API __declspec(dllimport)
34 #ifndef _HRESULT_DEFINED
35 #define _HRESULT_DEFINED
39 enum POSFORMAT { MILLISECONDS, BYTES, AC3FRAMES };
41 enum SOURCE { AC3FILE, MEMORY };
45 #define EAXAC3_ALREADYPLAYING 1
49 #define EAXAC3ERR_UNABLETOOPENEAXAC3DEVICE -1
50 #define EAXAC3ERR_WAVEOUTPREPAREHEADERFAILURE -2
51 #define EAXAC3ERR_OUTOFMEMORY -3
52 #define EAXAC3ERR_FILENOTFOUND -4
53 #define EAXAC3ERR_AC3FILETOBIG -5
54 #define EAXAC3ERR_AC3FRAMENOTFOUND -6
55 #define EAXAC3ERR_AC3NOTAT48KHZ -7
56 #define EAXAC3ERR_INVALIDAC3FRAME -8
57 #define EAXAC3ERR_AC3FILENOTOPEN -9
58 #define EAXAC3ERR_BUFFERNOTMULTIPLEOFAC3FRAMESIZE -10
59 #define EAXAC3ERR_WAVEOUTERROR -11
60 #define EAXAC3ERR_FAILEDTOCREATEEVENT -12
61 #define EAXAC3ERR_EAXAC3DEVICENOTOPEN -13
62 #define EAXAC3ERR_AC3STREAMALREADYOPEN -14
63 #define EAXAC3ERR_POSITIONOUTOFRANGE -15
64 #define EAXAC3ERR_NOTATSTARTOFAC3FRAME -16
65 #define EAXAC3ERR_AC3STREAMNOTOPEN -17
66 #define EAXAC3ERR_SETPOSITIONONLYWORKSONAC3FILES -18
67 #define EAXAC3ERR_WRITEDATAONLYWORKSWITHMEMORYSTREAMS -19
68 #define EAXAC3ERR_INVALIDPARAMETER -20
69 #define EAXAC3ERR_NOTENOUGHAC3DATAINAC3DATABUFFER -21
70 #define EAXAC3ERR_NOTENOUGHDATA -22
71 #define EAXAC3ERR_EAXAC3DEVICEALREADYOPEN -23
72 #define EAXAC3ERR_EAXAC3DEVICENOTFOUND -24
73 #define EAXAC3ERR_UNSUPPORTED -25
74 #define EAXAC3ERR_FAILEDTOCREATEFNTABLE -26
76 #define DEFAULTEAXAC3DEVICE 0
78 #define ENTIREBUFFER 0
79 #define FROMWRITECURSOR 1
85 typedef unsigned int EAXAC3HANDLE;
87 typedef unsigned int AC3STREAM;
90 typedef void (__stdcall *LPAC3CALLBACK)(AC3STREAM AC3Stream,
int msg);
93 #define EAXAC3NEEDMOREDATA 0
94 #define EAXAC3REACHEDEND 1
98 unsigned int nNumOfAC3Frames;
99 unsigned int nAC3FrameSize;
100 unsigned int nSizeOfFile;
101 unsigned int nDuration;
102 unsigned int nFrequency;
103 } AC3FILEINFO, *LPAC3FILEINFO;
106 #define SPDIFPASSTHRU 2
111 char szDeviceName[256];
113 unsigned int uStreams;
114 unsigned int uReserved;
115 } EAXAC3DEVICEINFO, *LPEAXAC3DEVICEINFO;
119 typedef int (*LPEAXAC3QUERYNUMBEROFDEVICES) (
void);
120 typedef HRESULT (*LPEAXAC3QUERYFILE) (
char *, LPAC3FILEINFO,
int);
121 typedef HRESULT (*LPEAXAC3QUERYMEMORY) (
char *,
int, LPAC3FILEINFO,
int);
122 typedef int (*LPEAXAC3QUERYNOOFFRAMESREQFORPLAYBACK) (AC3STREAM);
123 typedef HRESULT (*LPEAXAC3OPENPLAYBACKDEVICE) (EAXAC3HANDLE);
124 typedef HRESULT (*LPEAXAC3CLOSEPLAYBACKDEVICE) (EAXAC3HANDLE);
125 typedef HRESULT (*LPEAXAC3QUERYDEVICECAPS) (EAXAC3HANDLE, LPEAXAC3DEVICEINFO,
int);
126 typedef HRESULT (*LPEAXAC3GETPOSITION) (AC3STREAM,
enum POSFORMAT,
int *);
127 typedef HRESULT (*LPEAXAC3SETFILEPOSITION) (AC3STREAM,
enum POSFORMAT,
int);
128 typedef HRESULT (*LPEAXAC3OPENSTREAM) (EAXAC3HANDLE, AC3STREAM *, LPAC3CALLBACK,
char *,
enum SOURCE);
129 typedef HRESULT (*LPEAXAC3CLOSESTREAM) (AC3STREAM);
130 typedef HRESULT (*LPEAXAC3PREPLAYSTREAM) (AC3STREAM);
131 typedef HRESULT (*LPEAXAC3PLAYSTREAM) (AC3STREAM,
int);
132 typedef HRESULT (*LPEAXAC3STOPSTREAM) (AC3STREAM);
133 typedef HRESULT (*LPEAXAC3PAUSESTREAM) (AC3STREAM);
134 typedef HRESULT (*LPEAXAC3RESUMESTREAM) (AC3STREAM);
135 typedef HRESULT (*LPEAXAC3LOCKBUFFER) (AC3STREAM,
unsigned long,
void **,
unsigned long *,
void **,
136 unsigned long *,
unsigned long);
137 typedef HRESULT (*LPEAXAC3UNLOCKBUFFER) (AC3STREAM,
void *,
unsigned long,
void *,
unsigned long,
int);
138 typedef HRESULT (*LPEAXAC3SETPLAYBACKMODE) (EAXAC3HANDLE,
unsigned int);
139 typedef char * (*LPEAXAC3GETERRORSTRING) (
HRESULT,
char *,
int);
140 typedef HRESULT (*LPEAXAC3GETLASTERROR) (HRESULT *);
145 LPEAXAC3QUERYNUMBEROFDEVICES EAXAC3QueryNumberOfDevices;
146 LPEAXAC3QUERYFILE EAXAC3QueryFile;
147 LPEAXAC3QUERYMEMORY EAXAC3QueryMemory;
148 LPEAXAC3QUERYNOOFFRAMESREQFORPLAYBACK EAXAC3QueryNoOfFramesReqForPlayback;
149 LPEAXAC3OPENPLAYBACKDEVICE EAXAC3OpenPlaybackDevice;
150 LPEAXAC3CLOSEPLAYBACKDEVICE EAXAC3ClosePlaybackDevice;
151 LPEAXAC3QUERYDEVICECAPS EAXAC3QueryDeviceCaps;
152 LPEAXAC3GETPOSITION EAXAC3GetPosition;
153 LPEAXAC3SETFILEPOSITION EAXAC3SetFilePosition;
154 LPEAXAC3OPENSTREAM EAXAC3OpenStream;
155 LPEAXAC3CLOSESTREAM EAXAC3CloseStream;
156 LPEAXAC3PREPLAYSTREAM EAXAC3PrePlayStream;
157 LPEAXAC3PLAYSTREAM EAXAC3PlayStream;
158 LPEAXAC3STOPSTREAM EAXAC3StopStream;
159 LPEAXAC3PAUSESTREAM EAXAC3PauseStream;
160 LPEAXAC3RESUMESTREAM EAXAC3ResumeStream;
161 LPEAXAC3LOCKBUFFER EAXAC3LockBuffer;
162 LPEAXAC3UNLOCKBUFFER EAXAC3UnLockBuffer;
163 LPEAXAC3SETPLAYBACKMODE EAXAC3SetPlaybackMode;
164 LPEAXAC3GETERRORSTRING EAXAC3GetErrorString;
165 LPEAXAC3GETLASTERROR EAXAC3GetLastError;
166 } EAXAC3FNTABLE, *LPEAXAC3FNTABLE;
170 typedef EAXAC3_API
HRESULT (*LPEAXAC3GETFUNCTIONTABLE) (LPEAXAC3FNTABLE);
172 typedef ALboolean (*LPALEAXAC3GETFUNCTIONTABLE) (LPEAXAC3FNTABLE);
177 EAXAC3_API HRESULT EAXAC3GetFunctionTable(LPEAXAC3FNTABLE lpEAXAC3FnTable);
179 EAXAC3_API
int EAXAC3QueryNumberOfDevices();
181 EAXAC3_API HRESULT EAXAC3QueryFile(
char *szAC3Filename, LPAC3FILEINFO lpAC3Caps,
int nSizeOfAC3FileInfoStruct);
183 EAXAC3_API HRESULT EAXAC3QueryMemory(
char *lpBuffer,
int nSizeOfBuffer, LPAC3FILEINFO lpAC3FileInfo,
184 int nSizeOfAC3FileInfoStruct);
186 EAXAC3_API
int EAXAC3QueryNoOfFramesReqForPlayback(AC3STREAM AC3Stream);
188 EAXAC3_API HRESULT EAXAC3OpenPlaybackDevice(EAXAC3HANDLE EAXAC3Handle);
190 EAXAC3_API HRESULT EAXAC3ClosePlaybackDevice(EAXAC3HANDLE EAXAC3Handle);
192 EAXAC3_API HRESULT EAXAC3QueryDeviceCaps(EAXAC3HANDLE EAXAC3Handle, LPEAXAC3DEVICEINFO lpEAXAC3DeviceInfo,
193 int nSizeOfAC3DeviceInfoStruct);
195 EAXAC3_API HRESULT EAXAC3GetPosition(AC3STREAM AC3Stream,
enum POSFORMAT posFormat,
int *lpAmount);
197 EAXAC3_API HRESULT EAXAC3SetFilePosition(AC3STREAM AC3Stream,
enum POSFORMAT posFormat,
int nAmount);
199 EAXAC3_API HRESULT EAXAC3OpenStream(EAXAC3HANDLE EAXAC3Handle, AC3STREAM *lpAC3Stream,
200 LPAC3CALLBACK pAC3CallbackFn,
char *szAC3Filename,
enum SOURCE
src);
202 EAXAC3_API HRESULT EAXAC3CloseStream(AC3STREAM AC3Stream);
204 EAXAC3_API HRESULT EAXAC3PrePlayStream(AC3STREAM AC3Stream);
206 EAXAC3_API HRESULT EAXAC3PlayStream(AC3STREAM AC3Stream,
int nLooping);
208 EAXAC3_API HRESULT EAXAC3StopStream(AC3STREAM AC3Stream);
210 EAXAC3_API HRESULT EAXAC3PauseStream(AC3STREAM AC3Stream);
212 EAXAC3_API HRESULT EAXAC3ResumeStream(AC3STREAM AC3Stream);
214 EAXAC3_API HRESULT EAXAC3LockBuffer(AC3STREAM AC3Stream,
unsigned long ulBytes,
void **ppvPointer1,
215 unsigned long *pdwBytes1,
void **ppvPointer2,
unsigned long *pdwBytes2,
216 unsigned long ulFlags);
218 EAXAC3_API HRESULT EAXAC3UnLockBuffer(AC3STREAM AC3Stream,
void *pvPointer1,
unsigned long ulSize1,
219 void *pvPointer2,
unsigned long ulSize2,
int nFinished);
221 EAXAC3_API HRESULT EAXAC3SetPlaybackMode(EAXAC3HANDLE EAXAC3Handle,
unsigned int ulPlayMode);
223 EAXAC3_API
char * EAXAC3GetErrorString(HRESULT hr,
char *szErrorString,
int nSizeOfErrorString);
225 EAXAC3_API HRESULT EAXAC3GetLastError(HRESULT *hr);
char ALboolean
OpenAL cross platform audio library Copyright (C) 1999-2000 by authors.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
LPDIRECTSOUND IUnknown FAR *typedef HRESULT(FAR PASCAL *LPEAXDIRECTSOUNDCREATE)(GUID *