]> icculus.org git repositories - taylor/freespace2.git/blob - include/rsx.h
Initial revision
[taylor/freespace2.git] / include / rsx.h
1 /*
2 //   RSX.H
3 //
4 //              INTEL CORPORATION PROPRIETARY INFORMATION
5 //  This software is supplied under the terms of a license agreement or
6 //  nondisclosure agreement with Intel Corporation and may not be copied
7 //  or disclosed except in accordance with the terms of that agreement.
8 //
9 //      Copyright (c) 1996, 1997 Intel Corporation. All Rights Reserved.
10 //
11 //  PVCS:
12 //      $Workfile: rsx.h $
13 //      $Revision$
14 //      $Modtime: 8/25/98 2:00p $
15 //
16 //  PURPOSE:
17 //              RSX 3D Header
18 //
19 //  CONTENTS:
20 //              COM Interface declarations
21 //              Data Structures
22 //              Error Codes
23 //    
24 */
25
26
27 #ifndef __RSX20_INCLUDED__
28 #define __RSX20_INCLUDED__
29 #ifdef _WIN32
30 #define COM_NO_WINDOWS_H
31 #include <objbase.h>
32 #else
33 #define IUnknown        void
34 #endif
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #include "mmsystem.h"
41
42 #ifdef _WIN32
43
44 /* {E78F7620-96CB-11cf-A00B-444553540000} */
45 DEFINE_GUID(CLSID_RSX20, 
46     0xe78f7620, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
47
48 /* {4B2CE920-1C45-11d0-985D-00AA003B43AF} */
49 DEFINE_GUID(CLSID_RSXCACHEDEMITTER, 
50     0x4b2ce920, 0x1c45, 0x11d0, 0x98, 0x5d, 0x0, 0xaa, 0x0, 0x3b, 0x43, 0xaf);
51
52 /* {4B2CE921-1C45-11d0-985D-00AA003B43AF} */
53 DEFINE_GUID(CLSID_RSXSTREAMINGEMITTER,
54     0x4b2ce921, 0x1c45, 0x11d0, 0x98, 0x5d, 0x0, 0xaa, 0x0, 0x3b, 0x43, 0xaf);
55
56 /* {4B2CE922-1C45-11d0-985D-00AA003B43AF} */
57 DEFINE_GUID(CLSID_RSXDIRECTLISTENER,
58     0x4b2ce922, 0x1c45, 0x11d0, 0x98, 0x5d, 0x0, 0xaa, 0x0, 0x3b, 0x43, 0xaf);
59
60 /* {4B2CE923-1C45-11d0-985D-00AA003B43AF} */
61 DEFINE_GUID(CLSID_RSXSTREAMINGLISTENER,
62     0x4b2ce923, 0x1c45, 0x11d0, 0x98, 0x5d, 0x0, 0xaa, 0x0, 0x3b, 0x43, 0xaf);
63
64 /* {E78F7629-96CB-11cf-A00B-444553540000} */
65 DEFINE_GUID(IID_IRSX20, 
66     0xe78f7629, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
67
68 /* {B5B40681-1AC8-11d0-985D-00AA003B43AF} */
69 DEFINE_GUID(IID_IRSX2,
70     0xb5b40681, 0x1ac8, 0x11d0, 0x98, 0x5d, 0x0, 0xaa, 0x0, 0x3b, 0x43, 0xaf);
71
72 /* {E78F762D-96CB-11cf-A00B-444553540000} */
73 DEFINE_GUID(IID_IRSXCachedEmitter, 
74     0xe78f762d, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
75
76
77 /* {E78F7630-96CB-11cf-A00B-444553540000} */
78 DEFINE_GUID(IID_IRSXStreamingEmitter, 
79     0xe78f7630, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
80
81
82 /* {E78F7634-96CB-11cf-A00B-444553540000} */
83 DEFINE_GUID(IID_IRSXDirectListener, 
84     0xe78f7634, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
85
86
87 /* {E78F7638-96CB-11cf-A00B-444553540000} */
88 DEFINE_GUID(IID_IRSXStreamingListener, 
89     0xe78f7638, 0x96cb, 0x11cf, 0xa0, 0xb, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
90
91
92 #endif
93
94 typedef struct IRSX                                 FAR *LPRSX;
95 typedef struct IRSX2                                FAR *LPRSX2;
96 typedef struct IRSXCachedEmitter                    FAR *LPRSXCACHEDEMITTER;
97 typedef struct IRSXDirectListener                   FAR *LPRSXDIRECTLISTENER;
98 typedef struct IRSXStreamingEmitter                 FAR *LPRSXSTREAMINGEMITTER;
99 typedef struct IRSXStreamingListener                FAR *LPRSXSTREAMINGLISTENER;
100
101 typedef struct _RSXBUFFERHDR                        FAR *LPRSXBUFFERHDR;
102 typedef struct _RSXCACHEDEMITTERDESC                FAR *LPRSXCACHEDEMITTERDESC;
103 typedef struct _RSXDIRECTLISTENERDESC               FAR *LPRSXDIRECTLISTENERDESC;
104 typedef struct _RSXEMITTERMODEL                     FAR *LPRSXEMITTERMODEL;
105 typedef struct _RSXENVIRONMENT                      FAR *LPRSXENVIRONMENT;
106 typedef struct _RSXQUERYMEDIAINFO                   FAR *LPRSXQUERYMEDIAINFO;
107 typedef struct _RSXREVERBMODEL                      FAR *LPRSXREVERBMODEL;
108 typedef struct _RSXSTREAMINGEMITTERDESC             FAR *LPRSXSTREAMINGEMITTERDESC;
109 typedef struct _RSXSTREAMINGLISTENERDESC            FAR *LPRSXSTREAMINGLISTENERDESC;
110 typedef struct _RSXVECTOR3D                         FAR *LPRSXVECTOR3D;
111
112
113 #define RSX_MAX_NAME_LEN     (MAX_PATH)
114
115
116 /*
117 // Enumerated Types
118 */
119
120 enum RSX_CPU_Budget { RSX_MIN_BUDGET, RSX_LOW_BUDGET, RSX_MODERATE_BUDGET };
121
122
123 #ifdef _WIN32
124 #undef INTERFACE
125 #define INTERFACE IRSX
126 DECLARE_INTERFACE_( IRSX, IUnknown )
127 {
128     /*** IUnknown methods ***/
129     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
130
131     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
132     
133     STDMETHOD_(ULONG,Release) (THIS) PURE;
134     
135     
136     /*** IRSX methods ***/
137     STDMETHOD(CreateCachedEmitter)(THIS_  LPRSXCACHEDEMITTERDESC lpCachedEmitterAttr, 
138                                     LPRSXCACHEDEMITTER FAR *lpCachedEmitterInterface, 
139                                     IUnknown FAR *reserved) PURE;    
140     
141     STDMETHOD(CreateDirectListener)(THIS_  LPRSXDIRECTLISTENERDESC lpDirectListenerAttr, 
142                                     LPRSXDIRECTLISTENER FAR *lpDirectListenerInterface, 
143                                     IUnknown FAR *reserved) PURE;
144
145     STDMETHOD(CreateStreamingEmitter)(  THIS_  LPRSXSTREAMINGEMITTERDESC lpStreamingEmitterAttr, 
146                                         LPRSXSTREAMINGEMITTER FAR *lpStreamingEmitterInterface, 
147                                         IUnknown FAR *reserved) PURE;    
148     
149     STDMETHOD(CreateStreamingListener)( THIS_  LPRSXSTREAMINGLISTENERDESC lpStreamingListenerAttr,
150                                         LPRSXSTREAMINGLISTENER FAR *lpStreamingListenerInterface, 
151                                         IUnknown FAR *reserved) PURE;
152         
153     STDMETHOD(GetEnvironment)(THIS_ LPRSXENVIRONMENT lpEnvAttr) PURE;
154     
155     STDMETHOD(GetReverb)(THIS_ LPRSXREVERBMODEL lpReverbModel) PURE;
156     
157     STDMETHOD(SetEnvironment)(THIS_ LPRSXENVIRONMENT lpEnvAttr) PURE;
158     
159     STDMETHOD(SetReverb)(THIS_ LPRSXREVERBMODEL lpReverbModel) PURE;
160         
161 };
162 #endif
163
164 #ifdef _WIN32
165 #undef INTERFACE
166 #define INTERFACE IRSX2
167 DECLARE_INTERFACE_( IRSX2, IUnknown )
168 {
169     /*** IUnknown methods ***/
170     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
171     
172     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
173     
174     STDMETHOD_(ULONG,Release) (THIS) PURE;
175     
176     /* IRSX2 */
177     STDMETHOD(GetEnvironment)(THIS_ LPRSXENVIRONMENT lpEnvAttr) PURE;
178     
179     STDMETHOD(GetReverb)(THIS_ LPRSXREVERBMODEL lpReverbModel) PURE;
180     
181     STDMETHOD(SetEnvironment)(THIS_ LPRSXENVIRONMENT lpEnvAttr) PURE;
182     
183     STDMETHOD(SetReverb)(THIS_ LPRSXREVERBMODEL lpReverbModel) PURE;
184     
185 };
186 #endif
187
188
189
190
191 /*
192 // Flags for IRSXCachedEmitter::ControlMedia
193 //
194 */
195 #define RSX_PLAY            0x00000010
196 #define RSX_PAUSE           0x00000020
197 #define RSX_RESUME          0x00000040
198 #define RSX_STOP            0x00000050
199
200
201
202 #ifdef _WIN32
203 #undef INTERFACE
204 #define INTERFACE IRSXCachedEmitter
205 DECLARE_INTERFACE_( IRSXCachedEmitter, IUnknown )
206 {
207     /*** IUnknown methods ***/
208     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
209     
210     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
211     
212     STDMETHOD_(ULONG,Release) (THIS) PURE;
213
214
215     /*** IRSXEmitter methods ***/
216     
217     STDMETHOD(GetCPUBudget)(THIS_ enum RSX_CPU_Budget* lpCPUBudget) PURE;
218     
219     STDMETHOD(GetModel)(THIS_ LPRSXEMITTERMODEL lpEmitterModel) PURE;
220     
221     STDMETHOD(GetMuteState)(THIS_ LPDWORD lpdwMuteState) PURE;
222     
223     STDMETHOD(GetOrientation)(THIS_ LPRSXVECTOR3D lpOrientation) PURE;
224     
225     STDMETHOD(GetPitch)(THIS_ PFLOAT lpfPitch) PURE;
226     
227     STDMETHOD(GetUserData)(THIS_ LPDWORD lpdwUser) PURE;
228     
229     STDMETHOD(GetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
230
231     STDMETHOD(QueryMediaState)(THIS_ LPRSXQUERYMEDIAINFO lpQueryMediaInfo) PURE;
232
233     STDMETHOD(SetCPUBudget)(THIS_ enum RSX_CPU_Budget CPUBudget) PURE;
234     
235     STDMETHOD(SetModel)(THIS_ LPRSXEMITTERMODEL lpEmitterModel) PURE;
236     
237     STDMETHOD(SetMuteState)(THIS_ DWORD dwMuteState) PURE;
238     
239     STDMETHOD(SetOrientation)(THIS_ LPRSXVECTOR3D lpOrientation) PURE;
240     
241     STDMETHOD(SetPitch)(THIS_ FLOAT fPitch) PURE;
242     
243     STDMETHOD(SetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
244
245
246     /*** IRSXCachedEmitter methods ***/
247     STDMETHOD(ControlMedia)(THIS_ DWORD dwControl, 
248                             DWORD nLoops, 
249                             FLOAT fInitialStartTime) PURE;
250     
251     STDMETHOD(GetCacheTime)(THIS_ PFLOAT lpfCacheTime) PURE;
252
253     STDMETHOD(GetMarkPosition)( THIS_ PFLOAT lpfBeginTime, 
254                                 PFLOAT lpfEndTime) PURE;
255     
256     STDMETHOD(SetCacheTime)(THIS_ FLOAT fCacheTime) PURE;
257     
258     STDMETHOD(SetMarkPosition)(THIS_ FLOAT fBeginTime, FLOAT fEndTime) PURE;
259     
260     STDMETHOD(Initialize)(  THIS_ LPRSXCACHEDEMITTERDESC lpCachedEmitterAttr, 
261                             LPUNKNOWN pUnk) PURE;
262         
263
264 };
265 #endif
266
267
268
269 #ifdef _WIN32
270 #undef INTERFACE
271 #define INTERFACE IRSXStreamingEmitter
272 DECLARE_INTERFACE_( IRSXStreamingEmitter, IUnknown )
273 {
274     /*** IUnknown methods ***/
275     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
276     
277     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
278     
279     STDMETHOD_(ULONG,Release) (THIS) PURE;
280
281     /*** IRSXEmitter methods ***/
282     STDMETHOD(GetCPUBudget)(THIS_ enum RSX_CPU_Budget* lpCPUBudget) PURE;
283  
284     STDMETHOD(GetModel)(THIS_ LPRSXEMITTERMODEL lpEmitterModel) PURE;
285     
286     STDMETHOD(GetMuteState)(THIS_ LPDWORD lpdwMuteState) PURE;
287     
288     STDMETHOD(GetOrientation)(THIS_ LPRSXVECTOR3D lpOrientation) PURE;
289     
290     STDMETHOD(GetPitch)(THIS_ PFLOAT lpfPitch) PURE;
291     
292     STDMETHOD(GetUserData)(THIS_ LPDWORD lpdwUser) PURE;
293     
294     STDMETHOD(GetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
295
296     STDMETHOD(QueryMediaState)(THIS_ LPRSXQUERYMEDIAINFO lpQueryMediaInfo) PURE;
297
298     STDMETHOD(SetCPUBudget)(THIS_ enum RSX_CPU_Budget CPUBudget) PURE;
299     
300     STDMETHOD(SetModel)(THIS_ LPRSXEMITTERMODEL lpEmitterModel) PURE;
301     
302     STDMETHOD(SetMuteState)(THIS_ DWORD dwMuteState) PURE;
303     
304     STDMETHOD(SetOrientation)(THIS_ LPRSXVECTOR3D lpOrientation) PURE;
305     
306     STDMETHOD(SetPitch)(THIS_ FLOAT fPitch) PURE;
307     
308     STDMETHOD(SetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
309
310     /*** IRSXStreamingEmitter methods ***/
311     STDMETHOD(Flush)(THIS) PURE;
312     
313     STDMETHOD(SubmitBuffer)(THIS_ LPRSXBUFFERHDR lpBufferHdr) PURE;
314     
315     STDMETHOD(Initialize)(  THIS_ LPRSXSTREAMINGEMITTERDESC lpStreamingEmitterAttr, 
316                             LPUNKNOWN pUnk) PURE;
317
318
319 };
320 #endif
321
322
323
324 #ifdef _WIN32
325 #undef INTERFACE
326 #define INTERFACE IRSXDirectListener
327 DECLARE_INTERFACE_( IRSXDirectListener, IUnknown )
328 {
329     /*** IUnknown methods ***/
330     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
331     
332     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
333     
334     STDMETHOD_(ULONG,Release) (THIS) PURE;
335
336
337     /*** IRSXListener methods ***/
338     STDMETHOD(GetOrientation)(THIS_ LPRSXVECTOR3D lpDirection, LPRSXVECTOR3D lpUp) PURE;
339     
340     STDMETHOD(GetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
341     
342     STDMETHOD(GetUserData)(THIS_ LPDWORD lpdwUser) PURE;
343
344     STDMETHOD(SetOrientation)(THIS_ LPRSXVECTOR3D lpDirection, LPRSXVECTOR3D lpUp) PURE;
345     
346     STDMETHOD(SetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;    
347
348
349     /*** IRSXDirectListener methods ***/
350     STDMETHOD(Connect)(THIS) PURE;
351     
352     STDMETHOD(Disconnect)(THIS) PURE;
353
354     STDMETHOD(Initialize)(  THIS_ LPRSXDIRECTLISTENERDESC lpDirectListenerAttr, 
355                             LPUNKNOWN pUnk) PURE;
356
357
358 };
359 #endif
360
361
362 #ifdef _WIN32
363 #undef INTERFACE
364 #define INTERFACE IRSXStreamingListener
365 DECLARE_INTERFACE_( IRSXStreamingListener, IUnknown )
366 {
367     /*** IUnknown methods ***/
368     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
369     
370     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
371     
372     STDMETHOD_(ULONG,Release) (THIS) PURE;
373
374
375     /*** IRSXListener methods ***/
376     STDMETHOD(GetOrientation)(  THIS_ LPRSXVECTOR3D lpDirection, 
377                                 LPRSXVECTOR3D lpUp) PURE;
378     
379     STDMETHOD(GetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;
380     
381     STDMETHOD(GetUserData)(THIS_ LPDWORD lpdwUser) PURE;
382
383     STDMETHOD(SetOrientation)(  THIS_ LPRSXVECTOR3D lpDirection,
384                                 LPRSXVECTOR3D lpUp) PURE;
385     
386     STDMETHOD(SetPosition)(THIS_ LPRSXVECTOR3D lpPosition) PURE;    
387
388
389     /*** IRSXStreamingListener methods ***/
390     STDMETHOD(RequestBuffer)(   THIS_ LPSTR lpBufferA, 
391                                 LPSTR lpBufferB, 
392                                 DWORD dwSizeB) PURE;
393     
394     STDMETHOD(Initialize)(  THIS_ LPRSXSTREAMINGLISTENERDESC lpStreamingListenerAttr, 
395                             LPUNKNOWN pUnk) PURE;
396
397 };
398 #endif
399
400
401
402
403 /*
404 // RSXBUFFERHDR
405 */
406 typedef struct _RSXBUFFERHDR {
407     DWORD           cbSize;             /* structure size */
408     DWORD           dwUser;             /* user data */
409     DWORD           dwSize;             /* size of data pointed to by lpData */
410     LPSTR           lpData;             /* pointer to data */
411     HANDLE          hEventSignal;       /* event handle signaled when buffer complete */
412     DWORD           dwReserved1;        /* reserved for RSX 3D */
413     DWORD           dwReserved2;        /* reserved for RSX 3D */
414     DWORD           dwReserved3;        /* reserved for RSX 3D */
415     DWORD           dwReserved4;        /* reserved for RSX 3D */
416     DWORD           dwReserved5;        /* reserved for RSX 3D */
417 } RSXBUFFERHDR;
418
419
420 /*
421 // Flags for RSXCACHEDEMITTERDESC and RSXSTREAMINGEMITTERDESC
422 */
423 #define RSXEMITTERDESC_NODOPPLER        0x00000001
424 #define RSXEMITTERDESC_NOATTENUATE      0x00000002
425 #define RSXEMITTERDESC_NOSPATIALIZE     0x00000004
426 #define RSXEMITTERDESC_NOREVERB         0x00000008
427
428 /*
429 // Flags for RSXCACHEDEMITTERDESC
430 */
431 #define RSXEMITTERDESC_GROUPID          0x00000010
432 #define RSXEMITTERDESC_PREPROCESS       0x00000020
433 #define RSXEMITTERDESC_INMEMORY         0x00000040
434
435 /*
436 // RSXCACHEDEMITTERDESC
437 */
438
439 typedef struct _RSXCACHEDEMITTERDESC {
440     DWORD           cbSize;                         /* structure size */
441     DWORD           dwFlags;                        /* creation flags */
442     DWORD           dwGroupID;                      /* synchronization group ID, 
443                                                        use zero for no group */
444     char            szFilename[RSX_MAX_NAME_LEN];   /* path  */
445     HANDLE          hEventSignal;                   /* Signaled when play completes */
446     DWORD           dwUser;                         /* User specific */
447 } RSXCACHEDEMITTERDESC;
448
449
450
451 /*
452 // RSXDIRECTLISTENERDESC
453 */
454 typedef struct _RSXDIRECTLISTENERDESC {
455         DWORD           cbSize;                         /* structure size */
456         LPWAVEFORMATEX  lpwf;                           /* Requested output format */
457         HWND            hMainWnd;                       /* Main Window Handle DirectSound will use */
458         DWORD           dwUser;                         /* User specific */
459 } RSXDIRECTLISTENERDESC;
460
461
462
463 /*
464 // RSXEMITTERMODEL
465 */
466 typedef struct _RSXEMITTERMODEL {
467         DWORD                   cbSize;                 /* structure size */
468         float                   fMinBack;               /* min back -- ambient */
469         float                   fMinFront;              /* min front -- ambient */
470         float                   fMaxBack;               /* max back -- attenuation */
471         float                   fMaxFront;              /* max front -- attenuation */
472         float                   fIntensity;             /* static intensity */
473 } RSXEMITTERMODEL;
474
475
476
477 /*
478 // Flags for RSXENVIRONMENT
479 */
480 #define RSXENVIRONMENT_COORDINATESYSTEM         0x00000001
481 #define RSXENVIRONMENT_SPEEDOFSOUND             0x00000002
482 #define RSXENVIRONMENT_CPUBUDGET                0x00000004
483
484
485 /*
486 // RSXENVIRONMENT
487 */
488 typedef struct _RSXENVIRONMENT
489 {
490         DWORD                   cbSize;                 /* structure size */
491         DWORD                   dwFlags;                /* creation flags */
492         BOOL                    bUseRightHand;          /* coordinate system */
493         FLOAT                   fSpeedOfSound;          /* Speed of Sound for Doppler */
494         enum RSX_CPU_Budget     CPUBudget;              /* CPU limit for localization */
495   
496 } RSXENVIRONMENT;
497
498
499
500 /*
501 // RSXQUERYMEDIAINFO
502 */
503 typedef struct _RSXQUERYMEDIAINFO {
504
505         DWORD                   cbSize;                 /* structure size */
506         DWORD                   dwControl;              /* play state */
507         FLOAT                   fSecondsPlayed;         /* playback position in seconds */
508         FLOAT                   fTotalSeconds;          /* total play time */
509         DWORD                   dwNumLoops;             /* loop count */
510         FLOAT                   fAudibleLevel;          /* audible level */
511         
512 } RSXQUERYMEDIAINFO;
513
514
515
516 /*
517 // RSXREVERBMODEL
518 */
519 typedef struct _RSXREVERBMODEL
520 {
521         DWORD                   cbSize;                 /* structure size */
522         BOOL                    bUseReverb;             /* is reverb applied */
523         FLOAT                   fDecayTime;             /* Decay in seconds */
524         FLOAT                   fIntensity;             /* Gain to model sound absorption */
525 } RSXREVERBMODEL;
526
527
528
529 /* 
530 // RSXSTREAMINGEMITTERDESC
531 */
532
533 typedef struct _RSXSTREAMINGEMITTERDESC {
534         DWORD                   cbSize;                 /* structure size */
535         DWORD                   dwFlags;                /* creation flags */
536         DWORD                   dwType;                 /* unused -- must be zero */
537         LPWAVEFORMATEX          lpwf;                   /* buffer format */
538         DWORD                   dwUser;                 /* User specific */
539 } RSXSTREAMINGEMITTERDESC;
540
541
542 /*
543 // RSXSTREAMINGLISTENERDESC
544 */
545 typedef struct _RSXSTREAMINGLISTENERDESC {
546         DWORD                   cbSize;                 /* structure size */
547         LPWAVEFORMATEX          lpwf;                   /* Requested output format */
548         DWORD                   dwRequestedBufferSize;  /* Application requested buffer size */
549         DWORD                   dwActualBufferSize;     /* RSX specified buffer size */
550         DWORD                   dwUser;                 /* User specific */
551 } RSXSTREAMINGLISTENERDESC;
552
553
554
555 /*
556 // RSXVECTOR3D
557 */
558 typedef struct _RSXVECTOR3D {
559     float          x;
560     float          y;
561     float          z;    
562 } RSXVECTOR3D;
563
564
565
566 /*
567 // Error Codes
568 //
569 */
570
571
572
573 /* no sound driver installed */
574 #define RSXERR_NODRIVER                     MAKE_HRESULT( 1, FACILITY_ITF, 10 )
575
576 /* wave driver doesn't support format */
577 #define RSXERR_BADFORMAT                    MAKE_HRESULT( 1, FACILITY_ITF, 20 )
578
579 /* a zero length vector was specified for the orientation */
580 #define RSXERR_ZEROVECTOR                   MAKE_HRESULT( 1, FACILITY_ITF, 30 )
581
582 /* 
583 // an error occurred opening the wave file specified
584 // when creating the emitter
585 */
586 #define RSXERR_FILENOTFOUND                 MAKE_HRESULT( 1, FACILITY_ITF, 40 )
587
588 #define RSXERR_FILESHARINGVIOLATION         MAKE_HRESULT( 1, FACILITY_ITF, 41 )
589
590
591 /* the wave file is corrupted(not valid) */
592 #define RSXERR_CORRUPTFILE                  MAKE_HRESULT( 1, FACILITY_ITF, 50 )
593
594 /* the listeners orienation vectors are parallel */
595 #define RSXERR_PARALLELVECTORS              MAKE_HRESULT( 1, FACILITY_ITF, 60 )
596
597 /* sound resources are allocated or busy */
598 #define RSXERR_ALLOCATED                    MAKE_HRESULT( 1, FACILITY_ITF, 70 )
599
600 /* An invalid operation was performed while RSX is playing
601 // a cached emitter
602 */
603 #define RSXERR_PLAYING                      MAKE_HRESULT( 1, FACILITY_ITF, 80 )
604
605
606
607 #ifdef __cplusplus
608 };
609 #endif
610
611 #endif
612