source: trunk/src/dsound/OS2PrimBuff.h@ 10367

Last change on this file since 10367 was 5285, checked in by mike, 24 years ago

Slightly modified for building with Watcom.

File size: 3.7 KB
Line 
1/*
2 * Direct Sound Primary Buffer Implemetation for ODIN
3 *
4 * Kevin Langman (langman@earthling.net)
5 *
6 * Project Odin Software License can be found in LICENSE.TXT
7 */
8
9#ifndef __OS2PRIMBUFF_H__
10#define __OS2PRIMBUFF_H__
11
12#include <mmsystem.h>
13
14#undef THIS
15#define THIS VOID*This
16
17#undef THIS_
18#define THIS_ VOID*This,
19
20// a forward declaration is needed here
21class OS2IDirectSound3DListener;
22
23class OS2PrimBuff: public OS2IDirectSoundBuffer
24{
25 public:
26
27 OS2PrimBuff(OS2IDirectSound *DSound, const DSBUFFERDESC *lpDSBufferDesc);
28 ~OS2PrimBuff();
29
30 int Referenced;
31 inline HRESULT GetLastError() { return lastError; };
32 inline void Set3DListener(OS2IDirectSound3DListener *_listener) {
33 listener = _listener; };
34
35 private:
36 protected:
37
38 void *vpMixBuffer;
39 void *vpMixSetup;
40 void *vpBuffParms;
41 //void *vpGenericParms;
42
43 USHORT usDeviceID;
44
45 long rate; // Samples per second
46 WORD bps; // Bits per sample 8 or 16 !!
47 WORD channels;// Number of Channels 1 or 2 MONO/Stereo
48
49 OS2IDirectSound3DListener* listener; // pointer to the associated 3DListener object
50
51 HRESULT lastError;
52
53 friend HRESULT __stdcall PrimBufQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
54 friend ULONG __stdcall PrimBufAddRef(THIS);
55 friend ULONG __stdcall PrimBufRelease(THIS);
56 friend HRESULT __stdcall PrimBufGetCaps(THIS_ LPDSBCAPS );
57 friend HRESULT __stdcall PrimBufGetCurrentPosition(THIS_ LPDWORD,LPDWORD ) ;
58 friend HRESULT __stdcall PrimBufGetFormat(THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) ;
59 friend HRESULT __stdcall PrimBufGetVolume(THIS_ LPLONG ) ;
60 friend HRESULT __stdcall PrimBufGetPan(THIS_ LPLONG ) ;
61 friend HRESULT __stdcall PrimBufGetFrequency(THIS_ LPDWORD ) ;
62 friend HRESULT __stdcall PrimBufGetStatus(THIS_ LPDWORD ) ;
63 friend HRESULT __stdcall PrimBufInitialize(THIS_ LPDIRECTSOUND, LPDSBUFFERDESC ) ;
64 friend HRESULT __stdcall PrimBufLock(THIS_ DWORD,DWORD,LPVOID,LPDWORD,LPVOID,LPDWORD,DWORD ) ;
65 friend HRESULT __stdcall PrimBufPlay(THIS_ DWORD,DWORD,DWORD ) ;
66 friend HRESULT __stdcall PrimBufSetCurrentPosition(THIS_ DWORD ) ;
67 friend HRESULT __stdcall PrimBufSetFormat(THIS_ LPWAVEFORMATEX ) ;
68 friend HRESULT __stdcall PrimBufSetVolume(THIS_ LONG ) ;
69 friend HRESULT __stdcall PrimBufSetPan(THIS_ LONG ) ;
70 friend HRESULT __stdcall PrimBufSetFrequency(THIS_ DWORD ) ;
71 friend HRESULT __stdcall PrimBufStop(THIS ) ;
72 friend HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD ) ;
73 friend HRESULT __stdcall PrimBufRestore(THIS ) ;
74};
75
76HRESULT __stdcall PrimBufGetCaps(THIS_ LPDSBCAPS );
77HRESULT __stdcall PrimBufGetCurrentPosition(THIS_ LPDWORD,LPDWORD ) ;
78HRESULT __stdcall PrimBufGetFormat(THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) ;
79HRESULT __stdcall PrimBufGetVolume(THIS_ LPLONG ) ;
80HRESULT __stdcall PrimBufGetPan(THIS_ LPLONG ) ;
81HRESULT __stdcall PrimBufGetFrequency(THIS_ LPDWORD ) ;
82HRESULT __stdcall PrimBufGetStatus(THIS_ LPDWORD ) ;
83HRESULT __stdcall PrimBufInitialize(THIS_ LPDIRECTSOUND, LPDSBUFFERDESC ) ;
84HRESULT __stdcall PrimBufLock(THIS_ DWORD,DWORD,LPVOID,LPDWORD,LPVOID,LPDWORD,DWORD ) ;
85HRESULT __stdcall PrimBufPlay(THIS_ DWORD,DWORD,DWORD ) ;
86HRESULT __stdcall PrimBufSetCurrentPosition(THIS_ DWORD ) ;
87HRESULT __stdcall PrimBufSetFormat(THIS_ LPWAVEFORMATEX ) ;
88HRESULT __stdcall PrimBufSetVolume(THIS_ LONG ) ;
89HRESULT __stdcall PrimBufSetPan(THIS_ LONG ) ;
90HRESULT __stdcall PrimBufSetFrequency(THIS_ DWORD ) ;
91HRESULT __stdcall PrimBufStop(THIS ) ;
92HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD ) ;
93HRESULT __stdcall PrimBufRestore(THIS ) ;
94
95#endif
Note: See TracBrowser for help on using the repository browser.