source: trunk/src/dsound/new/OS2PrimBuff.h@ 3027

Last change on this file since 3027 was 3027, checked in by mike, 26 years ago

* empty log message *

File size: 3.4 KB
Line 
1/*
2 * Direct Sound Primary Buffer Implemetation ofr ODIN
3 *
4 * Kevin Langman
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
21
22class OS2PrimBuff: public OS2IDirectSoundBuffer
23{
24 public:
25
26 OS2PrimBuff(OS2IDirectSound *DSound, const DSBUFFERDESC *lpDSBufferDesc);
27 ~OS2PrimBuff();
28
29 int Referenced;
30 inline HRESULT GetLastError() { return lastError; };
31
32 private:
33 void *vpMixBuffer;
34 void *vpMixSetup;
35 void *vpBuffParms;
36 //void *vpGenericParms;
37
38 USHORT usDeviceID;
39
40 long rate; // Samples per second
41 long bps; // Bits per sample 8 or 16 !!
42 long channels;// Number of Channels 1 or 2 MONO/Stereo
43
44 protected:
45 HRESULT lastError;
46
47 friend HRESULT __stdcall PrimBufQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
48 friend ULONG __stdcall PrimBufAddRef(THIS);
49 friend ULONG __stdcall PrimBufRelease(THIS);
50 friend HRESULT __stdcall PrimBufGetCaps(THIS_ LPDSBCAPS );
51 friend HRESULT __stdcall PrimBufGetCurrentPosition(THIS_ LPDWORD,LPDWORD ) ;
52 friend HRESULT __stdcall PrimBufGetFormat(THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) ;
53 friend HRESULT __stdcall PrimBufGetVolume(THIS_ LPLONG ) ;
54 friend HRESULT __stdcall PrimBufGetPan(THIS_ LPLONG ) ;
55 friend HRESULT __stdcall PrimBufGetFrequency(THIS_ LPDWORD ) ;
56 friend HRESULT __stdcall PrimBufGetStatus(THIS_ LPDWORD ) ;
57 friend HRESULT __stdcall PrimBufInitialize(THIS_ LPDIRECTSOUND, LPDSBUFFERDESC ) ;
58 friend HRESULT __stdcall PrimBufLock(THIS_ DWORD,DWORD,LPVOID,LPDWORD,LPVOID,LPDWORD,DWORD ) ;
59 friend HRESULT __stdcall PrimBufPlay(THIS_ DWORD,DWORD,DWORD ) ;
60 friend HRESULT __stdcall PrimBufSetCurrentPosition(THIS_ DWORD ) ;
61 friend HRESULT __stdcall PrimBufSetFormat(THIS_ LPWAVEFORMATEX ) ;
62 friend HRESULT __stdcall PrimBufSetVolume(THIS_ LONG ) ;
63 friend HRESULT __stdcall PrimBufSetPan(THIS_ LONG ) ;
64 friend HRESULT __stdcall PrimBufSetFrequency(THIS_ DWORD ) ;
65 friend HRESULT __stdcall PrimBufStop(THIS ) ;
66 friend HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD ) ;
67 friend HRESULT __stdcall PrimBufRestore(THIS ) ;
68};
69
70HRESULT __stdcall PrimBufGetCaps(THIS_ LPDSBCAPS );
71HRESULT __stdcall PrimBufGetCurrentPosition(THIS_ LPDWORD,LPDWORD ) ;
72HRESULT __stdcall PrimBufGetFormat(THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) ;
73HRESULT __stdcall PrimBufGetVolume(THIS_ LPLONG ) ;
74HRESULT __stdcall PrimBufGetPan(THIS_ LPLONG ) ;
75HRESULT __stdcall PrimBufGetFrequency(THIS_ LPDWORD ) ;
76HRESULT __stdcall PrimBufGetStatus(THIS_ LPDWORD ) ;
77HRESULT __stdcall PrimBufInitialize(THIS_ LPDIRECTSOUND, LPDSBUFFERDESC ) ;
78HRESULT __stdcall PrimBufLock(THIS_ DWORD,DWORD,LPVOID,LPDWORD,LPVOID,LPDWORD,DWORD ) ;
79HRESULT __stdcall PrimBufPlay(THIS_ DWORD,DWORD,DWORD ) ;
80HRESULT __stdcall PrimBufSetCurrentPosition(THIS_ DWORD ) ;
81HRESULT __stdcall PrimBufSetFormat(THIS_ LPWAVEFORMATEX ) ;
82HRESULT __stdcall PrimBufSetVolume(THIS_ LONG ) ;
83HRESULT __stdcall PrimBufSetPan(THIS_ LONG ) ;
84HRESULT __stdcall PrimBufSetFrequency(THIS_ DWORD ) ;
85HRESULT __stdcall PrimBufStop(THIS ) ;
86HRESULT __stdcall PrimBufUnlock(THIS_ LPVOID,DWORD,LPVOID,DWORD ) ;
87HRESULT __stdcall PrimBufRestore(THIS ) ;
88
89#endif
Note: See TracBrowser for help on using the repository browser.