| 1 | /* $Id: OS2DSOUND.H,v 1.4 1999-10-23 23:00:49 sandervl 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 | class OS2IDirectSound
|
|---|
| 21 | {
|
|---|
| 22 | public:
|
|---|
| 23 | //this one has to go first!
|
|---|
| 24 | IDirectSoundVtbl *lpVtbl;
|
|---|
| 25 | IDirectSoundVtbl Vtbl;
|
|---|
| 26 |
|
|---|
| 27 | OS2IDirectSound(const GUID *lpGUID);
|
|---|
| 28 | ~OS2IDirectSound();
|
|---|
| 29 |
|
|---|
| 30 | int Referenced;
|
|---|
| 31 | inline HRESULT GetLastError() { return lastError; };
|
|---|
| 32 |
|
|---|
| 33 | private:
|
|---|
| 34 |
|
|---|
| 35 | protected:
|
|---|
| 36 | HRESULT lastError;
|
|---|
| 37 |
|
|---|
| 38 | DWORD speakerConfig;
|
|---|
| 39 | DWORD CoopLevel;
|
|---|
| 40 | HWND hwndClient;
|
|---|
| 41 |
|
|---|
| 42 | // Linked list management
|
|---|
| 43 | OS2IDirectSound* next; // Next OS2IDirectSound
|
|---|
| 44 | static OS2IDirectSound* dsound; // List of OS2IDirectSound
|
|---|
| 45 |
|
|---|
| 46 | friend HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
|
|---|
| 47 | friend ULONG __stdcall SoundAddRef(THIS);
|
|---|
| 48 | friend ULONG __stdcall SoundRelease(THIS);
|
|---|
| 49 | friend HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
|
|---|
| 50 | friend HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
|
|---|
| 51 | friend HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
|
|---|
| 52 | friend HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
|
|---|
| 53 | friend HRESULT __stdcall SoundCompact(THIS );
|
|---|
| 54 | friend HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
|
|---|
| 55 | friend HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
|
|---|
| 56 | friend HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
|
|---|
| 57 | };
|
|---|
| 58 | //******************************************************************************
|
|---|
| 59 | //******************************************************************************
|
|---|
| 60 | HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
|
|---|
| 61 | ULONG __stdcall SoundAddRef(THIS);
|
|---|
| 62 | ULONG __stdcall SoundRelease(THIS);
|
|---|
| 63 | HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
|
|---|
| 64 | HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
|
|---|
| 65 | HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
|
|---|
| 66 | HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
|
|---|
| 67 | HRESULT __stdcall SoundCompact(THIS );
|
|---|
| 68 | HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
|
|---|
| 69 | HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
|
|---|
| 70 | HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
|
|---|
| 71 |
|
|---|
| 72 | #endif
|
|---|