67 FIXME(
"Unknown MMSYS error %d\n",
err);
105 HKEY hkey, appkey = 0;
121 if ((
p =
strrchr( appname,
'/' ))) appname =
p + 1;
122 if ((
p =
strrchr( appname,
'\\' ))) appname =
p + 1;
123 strcat( appname,
"\\DirectSound" );
124 TRACE(
"appname = [%s]\n", appname);
125 if (
RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
177 TRACE(
"ds_hw_accel = %s\n",
193 return "DSDEVID_DefaultPlayback";
194 else if (
IsEqualGUID(&DSDEVID_DefaultVoicePlayback, pGuid))
195 return "DSDEVID_DefaultVoicePlayback";
196 else if (
IsEqualGUID(&DSDEVID_DefaultCapture, pGuid))
197 return "DSDEVID_DefaultCapture";
198 else if (
IsEqualGUID(&DSDEVID_DefaultVoiceCapture, pGuid))
199 return "DSDEVID_DefaultVoiceCapture";
227 if ( pGuidSrc ==
NULL) {
228 WARN(
"invalid parameter: pGuidSrc == NULL\n");
232 if ( pGuidDest ==
NULL ) {
233 WARN(
"invalid parameter: pGuidDest == NULL\n");
237 if (
IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
238 IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
244 if (
IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
245 IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
251 *pGuidDest = *pGuidSrc;
293 if (lpDSEnumCallback ==
NULL) {
294 WARN(
"invalid parameter: lpDSEnumCallback == NULL\n");
298 context.callA = lpDSEnumCallback;
326 TRACE(
"lpDSEnumCallback = %p, lpContext = %p\n",
327 lpDSEnumCallback, lpContext);
329 if (lpDSEnumCallback ==
NULL) {
330 WARN(
"invalid parameter: lpDSEnumCallback == NULL\n");
339 for (wod = 0; wod < devs; ++wod) {
343 TRACE(
"calling lpDSEnumCallback(NULL,\"%ls\",\"%ls\",%p)\n",
344 capsW.
szPname,
L"Primary Sound Driver",lpContext);
345 if (lpDSEnumCallback(
NULL, capsW.
szPname,
L"Primary Sound Driver", lpContext) ==
FALSE)
353 for (wod = 0; wod < devs; ++wod) {
356 TRACE(
"calling lpDSEnumCallback(%s,\"%ls\",\"%ls\",%p)\n",
384 if (lpDSEnumCallback ==
NULL) {
385 WARN(
"invalid parameter: lpDSEnumCallback == NULL\n");
389 context.callA = lpDSEnumCallback;
418 TRACE(
"(%p,%p)\n", lpDSEnumCallback, lpContext );
420 if (lpDSEnumCallback ==
NULL) {
421 WARN(
"invalid parameter: lpDSEnumCallback == NULL\n");
430 for (wid = 0; wid < devs; ++wid) {
434 TRACE(
"calling lpDSEnumCallback(NULL,\"%ls\",\"%ls\",%p)\n",
435 capsW.
szPname,
L"Primary Sound Capture Driver",lpContext);
436 if (lpDSEnumCallback(
NULL, capsW.
szPname,
L"Primary Sound Capture Driver", lpContext) ==
FALSE)
444 for (wid = 0; wid < devs; ++wid) {
447 TRACE(
"calling lpDSEnumCallback(%s,\"%ls\",\"%ls\",%p)\n",
485 IUnknown_AddRef(iface);
504 LPCLASSFACTORY iface,
516 WARN(
"invalid parameter\n");
520 return This->pfnCreateInstance(
riid, ppobj);
571 WARN(
"invalid parameter\n");
611#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
612 guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
613 guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
614 guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
615 guid.Data4[6] = b7; guid.Data4[7] = b8;
627 TRACE(
"DLL_PROCESS_ATTACH\n");
631 INIT_GUID(
DSOUND_renderer_guids[
i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 +
i);
632 INIT_GUID(
DSOUND_capture_guids[
i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 +
i);
640 TRACE(
"DLL_PROCESS_DETACH\n");
643 TRACE(
"UNKNOWN REASON\n");
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
HRESULT DSOUND_CaptureCreate8(REFIID riid, LPDIRECTSOUNDCAPTURE8 *ppDSC8)
HRESULT DSOUND_CaptureCreate(REFIID riid, LPDIRECTSOUNDCAPTURE *ppDSC)
DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS]
HRESULT DSOUND_Create(REFIID riid, LPDIRECTSOUND *ppDS)
HRESULT DSOUND_Create8(REFIID riid, LPDIRECTSOUND8 *ppDS)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define WideCharToMultiByte
BOOL WINAPI GetModuleHandleExW(IN DWORD dwFlags, IN LPCWSTR lpwModuleName OPTIONAL, OUT HMODULE *phModule)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
BOOL(CALLBACK * LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID)
#define DSERR_UNSUPPORTED
#define DSERR_OUTOFMEMORY
#define DSERR_INVALIDPARAM
BOOL(CALLBACK * LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID)
static int ds_default_capture
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]
static const char * get_device_id(LPCGUID pGuid)
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]
int ds_snd_shadow_maxsize
HRESULT WINAPI DllRegisterServer(void)
static HRESULT WINAPI DSCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
static HINSTANCE instance
int ds_default_sample_rate
static BOOL CALLBACK a_to_w_callback(LPGUID guid, LPCWSTR descW, LPCWSTR modW, LPVOID data)
HRESULT WINAPI DllUnregisterServer(void)
static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)
HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
static IClassFactoryImpl DSOUND_CF[]
static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
HRESULT(* FnCreateInstance)(REFIID riid, LPVOID *ppobj)
static const IClassFactoryVtbl DSCF_Vtbl
int ds_default_bits_per_sample
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
HRESULT WINAPI DllCanUnloadNow(void)
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
void setup_dsound_options(void)
DirectSoundDevice * DSOUND_renderer[MAXWAVEDRIVERS]
static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
static int ds_default_playback
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, IKsPropertySet **piks) DECLSPEC_HIDDEN
#define DS_HW_ACCEL_STANDARD
HRESULT DSOUND_FullDuplexCreate(REFIID riid, LPDIRECTSOUNDFULLDUPLEX *ppDSFD) DECLSPEC_HIDDEN
#define DS_HW_ACCEL_BASIC
#define DS_HW_ACCEL_EMULATION
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static IN DWORD IN LPVOID lpvReserved
#define WAVERR_STILLPLAYING
#define MMSYSERR_NOTSUPPORTED
#define MMSYSERR_NODRIVER
#define MMSYSERR_INVALHANDLE
#define MMSYSERR_INVALPARAM
#define MMSYSERR_ALLOCATED
#define MMSYSERR_BADDEVICEID
#define WAVERR_UNPREPARED
#define ERROR_FILE_NOT_FOUND
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
FnCreateInstance pfnCreateInstance
WCHAR szPname[MAXPNAMELEN]
WCHAR szPname[MAXPNAMELEN]
#define CONTAINING_RECORD(address, type, field)
static const WCHAR modW[]
#define CLASS_E_NOAGGREGATION
#define CLASS_E_CLASSNOTAVAILABLE
UINT WINAPI waveOutGetNumDevs(void)
UINT WINAPI waveOutGetDevCapsW(UINT_PTR uDeviceID, LPWAVEOUTCAPSW lpCaps, UINT uSize)
UINT WINAPI waveInGetNumDevs(void)
UINT WINAPI waveInGetDevCapsW(UINT_PTR uDeviceID, LPWAVEINCAPSW lpCaps, UINT uSize)
#define HKEY_CURRENT_USER