source: trunk/src/dsound/OS2DSOUND.H@ 8266

Last change on this file since 8266 was 3555, checked in by mike, 25 years ago

Updated and slightly fixed DSOUND

File size: 3.0 KB
Line 
1/* $Id: OS2DSOUND.H,v 1.6 2000-05-18 20:37:08 mike Exp $ */
2
3/*
4 * DirectSound main class
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11#ifndef __OS2DSOUND_H__
12#define __OS2DSOUND_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 need here!
21class OS2PrimBuff;
22
23class OS2IDirectSound
24{
25 public:
26 //this one has to go first!
27 IDirectSoundVtbl *lpVtbl;
28 IDirectSoundVtbl Vtbl;
29
30 OS2IDirectSound(const GUID *lpGUID);
31 ~OS2IDirectSound();
32
33 int Referenced;
34
35 static BOOL fDSExists;
36 inline HRESULT GetLastError() { return lastError; };
37 inline DWORD GetCoopLevel() { return CoopLevel; };
38
39 OS2PrimBuff* primary; // Primary Buffer..Created on construct of DSound (KL)
40 // (Public so that the Secondary buffer instances can access this.. Maybe a GetPrimary function would eb better?)
41
42 private:
43
44 protected:
45 HRESULT lastError;
46
47 DWORD speakerConfig;
48 DWORD CoopLevel;
49 HWND hwndClient;
50
51
52 // Linked list management
53 OS2IDirectSound* next; // Next OS2IDirectSound
54 static OS2IDirectSound* dsound; // List of OS2IDirectSound
55
56 friend HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
57 friend ULONG __stdcall SoundAddRef(THIS);
58 friend ULONG __stdcall SoundRelease(THIS);
59 friend HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
60 friend HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
61 friend HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
62 friend HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
63 friend HRESULT __stdcall SoundCompact(THIS );
64 friend HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
65 friend HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
66 friend HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
67};
68//******************************************************************************
69//******************************************************************************
70HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
71ULONG __stdcall SoundAddRef(THIS);
72ULONG __stdcall SoundRelease(THIS);
73HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
74HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
75HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
76HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
77HRESULT __stdcall SoundCompact(THIS );
78HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
79HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
80HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
81
82#endif
Note: See TracBrowser for help on using the repository browser.