Changeset 21878 for branches/gcc-kmk/src
- Timestamp:
- Dec 13, 2011, 11:17:52 AM (14 years ago)
- Location:
- branches/gcc-kmk/src
- Files:
-
- 1 added
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/Makefile.kmk
r21877 r21878 40 40 include $(PATH_SUB_CURRENT)/dplay/Makefile.kmk 41 41 include $(PATH_SUB_CURRENT)/dplayx/Makefile.kmk 42 include $(PATH_SUB_CURRENT)/dsound/Makefile.kmk 42 43 include $(PATH_SUB_CURRENT)/crypt32/Makefile.kmk 43 44 include $(PATH_SUB_CURRENT)/ctl3d32/Makefile.kmk -
branches/gcc-kmk/src/dsound/DAudioNotify.h
r5608 r21878 46 46 }; 47 47 48 HRESULT __stdcall DAudioNotifyQueryInterface(THIS, REFIID riid, LPVOID * ppvObj); 49 ULONG __stdcall DAudioNotifyAddRef(THIS); 50 ULONG __stdcall DAudioNotifyRelease(THIS); 51 HRESULT __stdcall DAudioNotifySetNotificationPositions(THIS, DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies); 52 48 53 #endif //__DAUDIONOTIFY_H__ -
branches/gcc-kmk/src/dsound/OS23DBuffer.h
r3099 r21878 58 58 }; 59 59 60 HRESULT __stdcall Sound3DBufferQueryInterface(THIS, REFIID riid, LPVOID * ppvObj); 61 ULONG __stdcall Sound3DBufferAddRef(THIS); 62 ULONG __stdcall Sound3DBufferRelease(THIS); 63 HRESULT __stdcall Sound3DBufferGetAllParameters(THIS, LPDS3DBUFFER lpDs3dBuffer); 64 HRESULT __stdcall Sound3DBufferSetAllParameters(THIS, LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply); 65 HRESULT __stdcall Sound3DBufferGetMaxDistance(THIS, LPD3DVALUE lpflMaxDistance); 66 HRESULT __stdcall Sound3DBufferGetMinDistance(THIS, LPD3DVALUE lpflMinDistance); 67 HRESULT __stdcall Sound3DBufferSetMaxDistance(THIS, D3DVALUE flMaxDistance, DWORD dwApply); 68 HRESULT __stdcall Sound3DBufferSetMinDistance(THIS, D3DVALUE flMinDistance, DWORD dwApply); 69 HRESULT __stdcall Sound3DBufferGetMode(THIS, LPDWORD lpdwMode); 70 HRESULT __stdcall Sound3DBufferSetMode(THIS, DWORD dwMode, DWORD dwApply); 71 HRESULT __stdcall Sound3DBufferGetPosition(THIS, LPD3DVECTOR lpvPosition); 72 HRESULT __stdcall Sound3DBufferSetPosition(THIS, D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply); 73 HRESULT __stdcall Sound3DBufferGetConeAngles(THIS, LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle); 74 HRESULT __stdcall Sound3DBufferSetConeAngles(THIS, DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply); 75 HRESULT __stdcall Sound3DBufferGetConeOrientation(THIS, LPD3DVECTOR lpvOrientation); 76 HRESULT __stdcall Sound3DBufferSetConeOrientation(THIS, D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply); 77 HRESULT __stdcall Sound3DBufferGetConeOutsideVolume(THIS, LPLONG lplConeOutsideVolume); 78 HRESULT __stdcall Sound3DBufferSetConeOutsideVolume(THIS, LONG lConeOutsideVolume, DWORD dwApply); 79 HRESULT __stdcall Sound3DBufferGetVelocity(THIS, LPD3DVECTOR lpvVelocity); 80 HRESULT __stdcall Sound3DBufferSetVelocity(THIS, D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply); 81 60 82 #endif -
branches/gcc-kmk/src/dsound/OS23DListener.h
r3099 r21878 55 55 }; 56 56 57 HRESULT __stdcall Sound3DListenerQueryInterface(THIS, REFIID riid, LPVOID * ppvObj); 58 ULONG __stdcall Sound3DListenerAddRef(THIS); 59 ULONG __stdcall Sound3DListenerRelease(THIS); 60 HRESULT __stdcall Sound3DListenerGetAllParameters(THIS, LPDS3DLISTENER lpListener); 61 HRESULT __stdcall Sound3DListenerSetAllParameters(THIS, LPCDS3DLISTENER lpcListener, DWORD dwApply); 62 HRESULT __stdcall Sound3DListenerCommitDeferredSettings(THIS); 63 HRESULT __stdcall Sound3DListenerGetDistanceFactor(THIS, LPD3DVALUE lpflDistanceFactor); 64 HRESULT __stdcall Sound3DListenerSetDistanceFactor(THIS, D3DVALUE flDistanceFactor, DWORD dwApply); 65 HRESULT __stdcall Sound3DListenerGetDopplerFactor(THIS, LPD3DVALUE lpflDopplerFactor); 66 HRESULT __stdcall Sound3DListenerSetDopplerFactor(THIS, D3DVALUE flDopplerFactor, DWORD dwApply); 67 HRESULT __stdcall Sound3DListenerGetOrientation(THIS, LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop); 68 HRESULT __stdcall Sound3DListenerSetOrientation(THIS, D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply); 69 HRESULT __stdcall Sound3DListenerGetPosition(THIS, LPD3DVECTOR lpvPosition); 70 HRESULT __stdcall Sound3DListenerSetPosition(THIS, D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply); 71 HRESULT __stdcall Sound3DListenerGetRolloffFactor(THIS, LPD3DVALUE lpflRolloffFactor); 72 HRESULT __stdcall Sound3DListenerSetRolloffFactor(THIS, D3DVALUE flRolloffFactor, DWORD dwApply); 73 HRESULT __stdcall Sound3DListenerGetVelocity(THIS, LPD3DVECTOR lpvVelocity); 74 HRESULT __stdcall Sound3DListenerSetVelocity(THIS, D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply); 75 57 76 #endif -
branches/gcc-kmk/src/dsound/OS2PrimBuff.h
r5285 r21878 74 74 }; 75 75 76 HRESULT __stdcall PrimBufQueryInterface(THIS, REFIID riid, LPVOID * ppvObj); 77 ULONG __stdcall PrimBufAddRef(THIS); 78 ULONG __stdcall PrimBufRelease(THIS); 76 79 HRESULT __stdcall PrimBufGetCaps(THIS_ LPDSBCAPS ); 77 80 HRESULT __stdcall PrimBufGetCurrentPosition(THIS_ LPDWORD,LPDWORD ) ; -
branches/gcc-kmk/src/dsound/dsound.def
r21692 r21878 6 6 EXPORTS 7 7 8 DirectSoundCreate = _OS2DirectSoundCreate@12@19 DirectSoundEnumerateA = _OS2DirectSoundEnumerateA@8@210 DirectSoundEnumerateW = _OS2DirectSoundEnumerateW@8@311 DirectSoundCaptureCreate = _OS2DirectSoundCreate@12@612 DirectSoundCaptureEnumerateA = _OS2DirectSoundEnumerateA@8@713 DirectSoundCaptureEnumerateW = _OS2DirectSoundEnumerateW@8@88 DirectSoundCreate = "_OS2DirectSoundCreate@12" @1 9 DirectSoundEnumerateA = "_OS2DirectSoundEnumerateA@8" @2 10 DirectSoundEnumerateW = "_OS2DirectSoundEnumerateW@8" @3 11 DirectSoundCaptureCreate = "_OS2DirectSoundCreate@12" @6 12 DirectSoundCaptureEnumerateA = "_OS2DirectSoundEnumerateA@8" @7 13 DirectSoundCaptureEnumerateW = "_OS2DirectSoundEnumerateW@8" @8 14 14 15 DllCanUnloadNow = _DSOUNDDllCanUnloadNow@0@416 DllGetClassObject = _DSOUNDDllGetClassObject@12@515 DllCanUnloadNow = "_DSOUNDDllCanUnloadNow@0" @4 16 DllGetClassObject = "_DSOUNDDllGetClassObject@12" @5 17 17 -
branches/gcc-kmk/src/dsound/initterm.cpp
r21842 r21878 1 /* $Id: init dsound.cpp,v 1.12002-09-14 08:31:25 sandervl Exp $1 /* $Id: initterm.cpp,v 1.18 2002-09-14 08:31:25 sandervl Exp $ 2 2 * 3 * D LL entry point3 * DSOUND DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 43 28 #include "initdsound.h" 44 29 45 extern "C" { 46 //Win32 resource table (produced by wrc) 47 extern DWORD _Resource_PEResTab; 48 } 30 // Win32 resource table (produced by wrc) 31 extern DWORD dsound_PEResTab; 49 32 50 33 static HMODULE dllHandle = 0; 51 34 static HMODULE MMPMLibraryHandle = 0; 35 36 char dsoundPath[CCHMAXPATH] = ""; 52 37 53 38 BOOL fdsMMPMAvailable = TRUE; … … 62 47 WORD wLength) = NULL; 63 48 64 65 //******************************************************************************66 //******************************************************************************67 49 BOOL WINAPI LibMainDSound(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 68 50 { 69 char szError[CCHMAXPATH];70 HKEY hKey;51 char szError[CCHMAXPATH]; 52 HKEY hKey; 71 53 72 switch (fdwReason)73 {74 case DLL_PROCESS_ATTACH:54 switch (fdwReason) 55 { 56 case DLL_PROCESS_ATTACH: 75 57 76 if(fdsMMPMAvailable == TRUE) 77 {//if audio access wasn't disabled already, check if mmpm2 is installed 58 if(fdsMMPMAvailable == TRUE) 59 { 60 // if audio access wasn't disabled already, check if mmpm2 is installed 78 61 // try to load the MDM library, not MMPM directly!!! 79 62 if (DosLoadModule(szError, sizeof(szError), … … 82 65 // this system has no MMPM :-( 83 66 fdsMMPMAvailable = FALSE; 84 } 67 } 85 68 else 86 69 { … … 89 72 1, /* ORD_MCISENDCOMMAND */ 90 73 NULL, 91 (PFN*)&pfnDSmciSendCommand) != NO_ERROR)74 (PFN*)&pfnDSmciSendCommand) != NO_ERROR) 92 75 { 93 76 fdsMMPMAvailable = FALSE; 94 } 77 } 95 78 else 96 79 { … … 113 96 } 114 97 115 if(fdsMMPMAvailable && RegOpenKeyA(HKEY_LOCAL_MACHINE, CUSTOM_BUILD_OPTIONS_KEY, &hKey) == 0) 98 if(fdsMMPMAvailable && RegOpenKeyA(HKEY_LOCAL_MACHINE, CUSTOM_BUILD_OPTIONS_KEY, &hKey) == 0) 116 99 { 117 100 DWORD dwSize, dwType; … … 135 118 return TRUE; 136 119 137 case DLL_THREAD_ATTACH:138 case DLL_THREAD_DETACH:120 case DLL_THREAD_ATTACH: 121 case DLL_THREAD_DETACH: 139 122 return TRUE; 140 123 141 case DLL_PROCESS_DETACH:124 case DLL_PROCESS_DETACH: 142 125 if(MMPMLibraryHandle) DosFreeModule(MMPMLibraryHandle); 143 126 return TRUE; 144 }145 return FALSE;127 } 128 return FALSE; 146 129 } 147 /****************************************************************************/148 /* _DLL_InitTerm is the function that gets called by the operating system */149 /* loader when it loads and frees this DLL for each process that accesses */150 /* this DLL. However, it only gets called the first time the DLL is loaded */151 /* and the last time it is freed for a particular process. The system */152 /* linkage convention MUST be used because the operating system loader is */153 /* calling this function. */154 /****************************************************************************/155 ULONG APIENTRY inittermDSound(ULONG hModule, ULONG ulFlag)156 {157 158 /*-------------------------------------------------------------------------*/159 /* If ulFlag is zero then the DLL is being loaded so initialization should */160 /* be performed. If ulFlag is 1 then the DLL is being freed so */161 /* termination should be performed. */162 /*-------------------------------------------------------------------------*/163 164 switch (ulFlag) {165 case 0 :166 {167 dllHandle = RegisterLxDll(hModule, LibMainDSound, (PVOID)&_Resource_PEResTab);168 if(dllHandle == 0)169 return 0UL;170 171 dprintf(("dsound init %s %s (%x)", __DATE__, __TIME__, inittermDSound));172 break;173 }174 175 case 1 :176 if(dllHandle) {177 UnregisterLxDll(dllHandle);178 }179 break;180 default :181 return 0UL;182 }183 184 /***********************************************************/185 /* A non-zero value must be returned to indicate success. */186 /***********************************************************/187 return 1UL;188 }189 //******************************************************************************190 //******************************************************************************191 130 192 131 DWORD APIENTRY dsmciSendCommand(WORD wDeviceID, … … 205 144 return ret; 206 145 } 207 //****************************************************************************** 208 //****************************************************************************** 146 209 147 DWORD APIENTRY dsmciGetErrorString(DWORD dwError, 210 148 LPSTR lpstrBuffer, … … 220 158 return ret; 221 159 } 222 //****************************************************************************** 223 //****************************************************************************** 160 161 ULONG SYSTEM DLL_InitDSound(ULONG hModule) 162 { 163 DosQueryModuleName(hModule, CCHMAXPATH, dsoundPath); 164 char *endofpath = strrchr(dsoundPath, '\\'); 165 if (endofpath) 166 *(endofpath+1) = 0; 167 168 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 169 170 dllHandle = RegisterLxDll(hModule, LibMainDSound, (PVOID)&dsound_PEResTab); 171 if(dllHandle == 0) 172 return -1; 173 174 dprintf(("dsound init %s %s (%x)", __DATE__, __TIME__, DLL_InitDSound)); 175 176 return 0; 177 } 178 179 void SYSTEM DLL_TermDSound(ULONG hModule) 180 { 181 if (dllHandle) 182 UnregisterLxDll(dllHandle); 183 } 184 185 ULONG SYSTEM DLL_Init(ULONG hModule) 186 { 187 if (DLL_InitDefault(hModule) == -1) 188 return -1; 189 return DLL_InitDSound(hModule); 190 } 191 192 void SYSTEM DLL_Term(ULONG hModule) 193 { 194 DLL_TermDSound(hModule); 195 DLL_TermDefault(hModule); 196 } -
branches/gcc-kmk/src/dsound/os2notify.h
r21692 r21878 46 46 }; 47 47 48 HRESULT __stdcall SoundNotifyQueryInterface(THIS, REFIID riid, LPVOID * ppvObj); 49 ULONG __stdcall SoundNotifyAddRef(THIS); 50 ULONG __stdcall SoundNotifyRelease(THIS); 51 HRESULT __stdcall SoundNotifySetNotificationPositions(THIS, DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies); 52 48 53 #endif -
branches/gcc-kmk/src/dsound/os2sndbuffer.h
r21692 r21878 43 43 ~OS2IDirectSoundBuffer(); 44 44 45 static void OS2IDirectSoundBuffer::DestroyAllBuffers(); // called when DSound is closed45 static void DestroyAllBuffers(); // called when DSound is closed 46 46 47 47 int Referenced;
Note:
See TracChangeset
for help on using the changeset viewer.