[3555] | 1 | /* $Id: OS2DSOUND.H,v 1.6 2000-05-18 20:37:08 mike Exp $ */
|
---|
[97] | 2 |
|
---|
[4] | 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 |
|
---|
[1421] | 14 | #undef THIS
|
---|
| 15 | #define THIS VOID*This
|
---|
[4] | 16 |
|
---|
[1421] | 17 | #undef THIS_
|
---|
| 18 | #define THIS_ VOID*This,
|
---|
| 19 |
|
---|
[3555] | 20 | // A forward declaration is need here!
|
---|
| 21 | class OS2PrimBuff;
|
---|
| 22 |
|
---|
[21571] | 23 | // GUID for the only device we provide (DART DirectSound for OS/2)
|
---|
| 24 | DEFINE_GUID(GUID_DirectSound_DART, 0x03BC8FA8, 0x3460, 0x11E0, 0x99, 0x51, 0x49, 0xC1, 0xDF, 0xD7, 0x20, 0x85 );
|
---|
| 25 |
|
---|
[4] | 26 | class OS2IDirectSound
|
---|
| 27 | {
|
---|
| 28 | public:
|
---|
| 29 | //this one has to go first!
|
---|
| 30 | IDirectSoundVtbl *lpVtbl;
|
---|
| 31 | IDirectSoundVtbl Vtbl;
|
---|
| 32 |
|
---|
| 33 | OS2IDirectSound(const GUID *lpGUID);
|
---|
[3099] | 34 | ~OS2IDirectSound();
|
---|
[4] | 35 |
|
---|
[3099] | 36 | int Referenced;
|
---|
[4] | 37 |
|
---|
[3099] | 38 | static BOOL fDSExists;
|
---|
| 39 | inline HRESULT GetLastError() { return lastError; };
|
---|
| 40 | inline DWORD GetCoopLevel() { return CoopLevel; };
|
---|
| 41 |
|
---|
[3555] | 42 | OS2PrimBuff* primary; // Primary Buffer..Created on construct of DSound (KL)
|
---|
| 43 | // (Public so that the Secondary buffer instances can access this.. Maybe a GetPrimary function would eb better?)
|
---|
| 44 |
|
---|
[4] | 45 | private:
|
---|
| 46 |
|
---|
| 47 | protected:
|
---|
[3099] | 48 | HRESULT lastError;
|
---|
[4] | 49 |
|
---|
| 50 | DWORD speakerConfig;
|
---|
| 51 | DWORD CoopLevel;
|
---|
| 52 | HWND hwndClient;
|
---|
| 53 |
|
---|
[3099] | 54 |
|
---|
[4] | 55 | // Linked list management
|
---|
| 56 | OS2IDirectSound* next; // Next OS2IDirectSound
|
---|
| 57 | static OS2IDirectSound* dsound; // List of OS2IDirectSound
|
---|
| 58 |
|
---|
[1421] | 59 | friend HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
|
---|
[4] | 60 | friend ULONG __stdcall SoundAddRef(THIS);
|
---|
| 61 | friend ULONG __stdcall SoundRelease(THIS);
|
---|
[1421] | 62 | friend HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
|
---|
[4] | 63 | friend HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
|
---|
| 64 | friend HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
|
---|
[1421] | 65 | friend HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
|
---|
[4] | 66 | friend HRESULT __stdcall SoundCompact(THIS );
|
---|
| 67 | friend HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
|
---|
| 68 | friend HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
|
---|
[1421] | 69 | friend HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
|
---|
[4] | 70 | };
|
---|
| 71 | //******************************************************************************
|
---|
| 72 | //******************************************************************************
|
---|
[1421] | 73 | HRESULT __stdcall SoundQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
|
---|
[4] | 74 | ULONG __stdcall SoundAddRef(THIS);
|
---|
| 75 | ULONG __stdcall SoundRelease(THIS);
|
---|
[1421] | 76 | HRESULT __stdcall SoundCreateSoundBuffer(THIS_ LPDSBUFFERDESC, LPDIRECTSOUNDBUFFER*,LPUNKNOWN);
|
---|
[4] | 77 | HRESULT __stdcall SoundGetCaps(THIS_ LPDSCAPS );
|
---|
| 78 | HRESULT __stdcall SoundDuplicateSoundBuffer(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER );
|
---|
[1421] | 79 | HRESULT __stdcall SoundSetCooperativeLevel(THIS_ HWND, DWORD );
|
---|
[4] | 80 | HRESULT __stdcall SoundCompact(THIS );
|
---|
| 81 | HRESULT __stdcall SoundGetSpeakerConfig(THIS_ LPDWORD );
|
---|
| 82 | HRESULT __stdcall SoundSetSpeakerConfig(THIS_ DWORD );
|
---|
[1421] | 83 | HRESULT __stdcall SoundInitialize(THIS_ LPGUID);
|
---|
[4] | 84 |
|
---|
[97] | 85 | #endif
|
---|