ReactOS  0.4.14-dev-317-g96040ec
dsound_main.c File Reference
#include "dsound_private.h"
#include <winreg.h>
#include <rpcproxy.h>
Include dependency graph for dsound_main.c:

Go to the source code of this file.

Classes

struct  morecontext
 
struct  IClassFactoryImpl
 

Macros

#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
 

Typedefs

typedef HRESULT(* FnCreateInstance) (REFIID riid, LPVOID *ppobj)
 

Functions

HRESULT mmErr (UINT err)
 
static DWORD get_config_key (HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
 
void setup_dsound_options (void)
 
static const charget_device_id (LPCGUID pGuid)
 
HRESULT WINAPI GetDeviceID (LPCGUID pGuidSrc, LPGUID pGuidDest)
 
static BOOL CALLBACK a_to_w_callback (LPGUID guid, LPCWSTR descW, LPCWSTR modW, LPVOID data)
 
HRESULT WINAPI DirectSoundEnumerateA (LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)
 
HRESULT WINAPI DirectSoundEnumerateW (LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
 
HRESULT WINAPI DirectSoundCaptureEnumerateA (LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)
 
HRESULT WINAPI DirectSoundCaptureEnumerateW (LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
 
static IClassFactoryImplimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI DSCF_QueryInterface (LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
 
static ULONG WINAPI DSCF_AddRef (LPCLASSFACTORY iface)
 
static ULONG WINAPI DSCF_Release (LPCLASSFACTORY iface)
 
static HRESULT WINAPI DSCF_CreateInstance (LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
 
static HRESULT WINAPI DSCF_LockServer (LPCLASSFACTORY iface, BOOL dolock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 

Variables

DirectSoundDeviceDSOUND_renderer [MAXWAVEDRIVERS]
 
GUID DSOUND_renderer_guids [MAXWAVEDRIVERS]
 
GUID DSOUND_capture_guids [MAXWAVEDRIVERS]
 
int ds_emuldriver = 0
 
int ds_hel_buflen = 32768 * 2
 
int ds_snd_queue_max = 10
 
int ds_snd_queue_min = 6
 
int ds_snd_shadow_maxsize = 2
 
int ds_hw_accel = DS_HW_ACCEL_FULL
 
int ds_default_sample_rate = 44100
 
int ds_default_bits_per_sample = 16
 
static int ds_default_playback
 
static int ds_default_capture
 
static HINSTANCE instance
 
struct morecontext helpstring
 
static const IClassFactoryVtbl DSCF_Vtbl
 
static IClassFactoryImpl DSOUND_CF []
 

Macro Definition Documentation

◆ INIT_GUID

#define INIT_GUID (   guid,
  l,
  w1,
  w2,
  b1,
  b2,
  b3,
  b4,
  b5,
  b6,
  b7,
  b8 
)
Value:
guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
guid.Data4[6] = b7; guid.Data4[7] = b8;
const GUID * guid
static CRYPT_DATA_BLOB b1[]
Definition: msg.c:573
r l[0]
Definition: byte_order.h:167
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
Definition: glext.h:8308
static CRYPT_DATA_BLOB b3[]
Definition: msg.c:592
static CRYPT_DATA_BLOB b2[]
Definition: msg.c:582
static CRYPT_DATA_BLOB b4
Definition: msg.c:2284
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble w1
Definition: glext.h:8308

Definition at line 639 of file dsound_main.c.

Typedef Documentation

◆ FnCreateInstance

typedef HRESULT(* FnCreateInstance) (REFIID riid, LPVOID *ppobj)

Definition at line 489 of file dsound_main.c.

Function Documentation

◆ a_to_w_callback()

static BOOL CALLBACK a_to_w_callback ( LPGUID  guid,
LPCWSTR  descW,
LPCWSTR  modW,
LPVOID  data 
)
static

Definition at line 262 of file dsound_main.c.

263 {
264  struct morecontext *context = data;
265  char descA[MAXPNAMELEN], modA[MAXPNAMELEN];
266 
267  WideCharToMultiByte(CP_ACP, 0, descW, -1, descA, sizeof(descA), NULL, NULL);
268  WideCharToMultiByte(CP_ACP, 0, modW, -1, modA, sizeof(modA), NULL, NULL);
269 
270  return context->callA(guid, descA, modA, context->data);
271 }
#define WideCharToMultiByte
Definition: compat.h:101
Definition: http.c:6587
#define CP_ACP
Definition: compat.h:99
const GUID * guid
smooth NULL
Definition: ftsmooth.c:416
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const WCHAR modW[]
Definition: lex.c:64
#define MAXPNAMELEN
Definition: mmsystem.h:24

Referenced by DirectSoundCaptureEnumerateA(), and DirectSoundEnumerateA().

◆ DirectSoundCaptureEnumerateA()

HRESULT WINAPI DirectSoundCaptureEnumerateA ( LPDSENUMCALLBACKA  lpDSEnumCallback,
LPVOID  lpContext 
)

Definition at line 390 of file dsound_main.c.

393 {
394  struct morecontext context;
395 
396  if (lpDSEnumCallback == NULL) {
397  WARN("invalid parameter: lpDSEnumCallback == NULL\n");
398  return DSERR_INVALIDPARAM;
399  }
400 
401  context.callA = lpDSEnumCallback;
402  context.data = lpContext;
403 
405 }
Definition: http.c:6587
#define WARN(fmt,...)
Definition: debug.h:111
static BOOL CALLBACK a_to_w_callback(LPGUID guid, LPCWSTR descW, LPCWSTR modW, LPVOID data)
Definition: dsound_main.c:262
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
Definition: dsound_main.c:421

◆ DirectSoundCaptureEnumerateW()

HRESULT WINAPI DirectSoundCaptureEnumerateW ( LPDSENUMCALLBACKW  lpDSEnumCallback,
LPVOID  lpContext 
)

Definition at line 421 of file dsound_main.c.

424 {
425  unsigned devs, wid;
427  GUID guid;
428  int err;
429  WCHAR wDesc[MAXPNAMELEN];
430  WCHAR wName[MAXPNAMELEN];
431 
432  TRACE("(%p,%p)\n", lpDSEnumCallback, lpContext );
433 
434  if (lpDSEnumCallback == NULL) {
435  WARN("invalid parameter: lpDSEnumCallback == NULL\n");
436  return DSERR_INVALIDPARAM;
437  }
438 
440 
441  devs = waveInGetNumDevs();
442  if (devs > 0) {
443  if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
444  for (wid = 0; wid < devs; ++wid) {
445  if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
446  err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel));
447  if (err == DS_OK) {
448  TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
449  "Primary Sound Capture Driver",desc.szDrvname,lpContext);
450  MultiByteToWideChar( CP_ACP, 0, "Primary Sound Capture Driver", -1,
451  wDesc, sizeof(wDesc)/sizeof(WCHAR) );
452  MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
453  wName, sizeof(wName)/sizeof(WCHAR) );
454  wName[(sizeof(wName)/sizeof(WCHAR)) - 1] = '\0';
455 
456  if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE)
457  return DS_OK;
458  }
459  }
460  }
461  }
462  }
463 
464  for (wid = 0; wid < devs; ++wid) {
465  err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel));
466  if (err == DS_OK) {
467  TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
468  debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
469  MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
470  wDesc, sizeof(wDesc)/sizeof(WCHAR) );
471  wDesc[(sizeof(wDesc)/sizeof(WCHAR)) - 1] = '\0';
472 
473  MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
474  wName, sizeof(wName)/sizeof(WCHAR) );
475  wName[(sizeof(wName)/sizeof(WCHAR)) - 1] = '\0';
476 
477  if (lpDSEnumCallback(&DSOUND_capture_guids[wid], wDesc, wName, lpContext) == FALSE)
478  return DS_OK;
479  }
480  }
481 
482  return DS_OK;
483 }
void setup_dsound_options(void)
Definition: dsound_main.c:101
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
Definition: dsound_main.c:222
UINT WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: winmm.c:2816
const GUID * guid
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:42
static const WCHAR desc[]
Definition: protectdata.c:36
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
HRESULT mmErr(UINT err)
Definition: dsound_main.c:44
#define DS_OK
Definition: dsound.h:116
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define err(...)
uint32_t DWORD_PTR
Definition: typedefs.h:63
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define MAXPNAMELEN
Definition: mmsystem.h:24
#define MultiByteToWideChar
Definition: compat.h:100
UINT WINAPI waveInGetNumDevs(void)
Definition: winmm.c:2568
int ds_hw_accel
Definition: dsound_main.c:77

Referenced by DirectSoundCaptureEnumerateA().

◆ DirectSoundEnumerateA()

HRESULT WINAPI DirectSoundEnumerateA ( LPDSENUMCALLBACKA  lpDSEnumCallback,
LPVOID  lpContext 
)

Definition at line 286 of file dsound_main.c.

289 {
290  struct morecontext context;
291 
292  if (lpDSEnumCallback == NULL) {
293  WARN("invalid parameter: lpDSEnumCallback == NULL\n");
294  return DSERR_INVALIDPARAM;
295  }
296 
297  context.callA = lpDSEnumCallback;
298  context.data = lpContext;
299 
301 }
Definition: http.c:6587
#define WARN(fmt,...)
Definition: debug.h:111
static BOOL CALLBACK a_to_w_callback(LPGUID guid, LPCWSTR descW, LPCWSTR modW, LPVOID data)
Definition: dsound_main.c:262
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
Definition: dsound_main.c:316
smooth NULL
Definition: ftsmooth.c:416

◆ DirectSoundEnumerateW()

HRESULT WINAPI DirectSoundEnumerateW ( LPDSENUMCALLBACKW  lpDSEnumCallback,
LPVOID  lpContext 
)

Definition at line 316 of file dsound_main.c.

319 {
320  unsigned devs, wod;
322  GUID guid;
323  int err;
324  WCHAR wDesc[MAXPNAMELEN];
325  WCHAR wName[MAXPNAMELEN];
326 
327  TRACE("lpDSEnumCallback = %p, lpContext = %p\n",
328  lpDSEnumCallback, lpContext);
329 
330  if (lpDSEnumCallback == NULL) {
331  WARN("invalid parameter: lpDSEnumCallback == NULL\n");
332  return DSERR_INVALIDPARAM;
333  }
334 
336 
337  devs = waveOutGetNumDevs();
338  if (devs > 0) {
339  if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
340  static const WCHAR empty[] = { 0 };
341  for (wod = 0; wod < devs; ++wod) {
342  if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod] ) ) {
343  err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel));
344  if (err == DS_OK) {
345  TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
346  "Primary Sound Driver",desc.szDrvname,lpContext);
347  MultiByteToWideChar( CP_ACP, 0, "Primary Sound Driver", -1,
348  wDesc, sizeof(wDesc)/sizeof(WCHAR) );
349  if (lpDSEnumCallback(NULL, wDesc, empty, lpContext) == FALSE)
350  return DS_OK;
351  }
352  }
353  }
354  }
355  }
356 
357  for (wod = 0; wod < devs; ++wod) {
358  err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,ds_hw_accel));
359  if (err == DS_OK) {
360  TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
361  debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
362  MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
363  wDesc, sizeof(wDesc)/sizeof(WCHAR) );
364  wDesc[(sizeof(wDesc)/sizeof(WCHAR)) - 1] = '\0';
365 
366  MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
367  wName, sizeof(wName)/sizeof(WCHAR) );
368  wName[(sizeof(wName)/sizeof(WCHAR)) - 1] = '\0';
369 
370  if (lpDSEnumCallback(&DSOUND_renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
371  return DS_OK;
372  }
373  }
374  return DS_OK;
375 }
void setup_dsound_options(void)
Definition: dsound_main.c:101
UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
Definition: winmm.c:2541
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
Definition: dsound_main.c:222
const GUID * guid
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
static const WCHAR desc[]
Definition: protectdata.c:36
smooth NULL
Definition: ftsmooth.c:416
UINT WINAPI waveOutGetNumDevs(void)
Definition: winmm.c:2140
#define debugstr_guid
Definition: kernel32.h:35
HRESULT mmErr(UINT err)
Definition: dsound_main.c:44
#define DS_OK
Definition: dsound.h:116
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define err(...)
uint32_t DWORD_PTR
Definition: typedefs.h:63
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
BOOL empty
Definition: button.c:170
#define MAXPNAMELEN
Definition: mmsystem.h:24
#define MultiByteToWideChar
Definition: compat.h:100
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:41
int ds_hw_accel
Definition: dsound_main.c:77

Referenced by DirectSoundEnumerateA().

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 634 of file dsound_main.c.

635 {
636  return S_FALSE;
637 }
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 593 of file dsound_main.c.

594 {
595  int i = 0;
596  TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
597 
598  if (ppv == NULL) {
599  WARN("invalid parameter\n");
600  return E_INVALIDARG;
601  }
602 
603  *ppv = NULL;
604 
607  WARN("no interface for %s\n", debugstr_guid(riid));
608  return E_NOINTERFACE;
609  }
610 
611  while (NULL != DSOUND_CF[i].rclsid) {
612  if (IsEqualGUID(rclsid, DSOUND_CF[i].rclsid)) {
613  DSCF_AddRef(&DSOUND_CF[i].IClassFactory_iface);
614  *ppv = &DSOUND_CF[i];
615  return S_OK;
616  }
617  i++;
618  }
619 
620  WARN("(%s, %s, %p): no class found.\n", debugstr_guid(rclsid),
623 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
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
Definition: glfuncs.h:248
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
Definition: dsound_main.c:520
static IClassFactoryImpl DSOUND_CF[]
Definition: dsound_main.c:566
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 648 of file dsound_main.c.

649 {
650  int i;
651  TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpvReserved);
652 
653  switch (fdwReason) {
654  case DLL_PROCESS_ATTACH:
655  TRACE("DLL_PROCESS_ATTACH\n");
656  for (i = 0; i < MAXWAVEDRIVERS; i++) {
658  DSOUND_capture[i] = NULL;
659  INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
660  INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
661  }
662  instance = hInstDLL;
663  DisableThreadLibraryCalls(hInstDLL);
664  /* Increase refcount on dsound by 1 */
665  GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)hInstDLL, &hInstDLL);
666  break;
667  case DLL_PROCESS_DETACH:
668  TRACE("DLL_PROCESS_DETACH\n");
669  break;
670  default:
671  TRACE("UNKNOWN REASON\n");
672  break;
673  }
674  return TRUE;
675 }
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static IN DWORD IN LPVOID lpvReserved
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
Definition: glfuncs.h:248
static HINSTANCE instance
Definition: dsound_main.c:82
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: dsound_main.c:639
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:42
DirectSoundDevice * DSOUND_renderer[MAXWAVEDRIVERS]
Definition: dsound_main.c:40
smooth NULL
Definition: ftsmooth.c:416
#define DLL_PROCESS_DETACH
Definition: compat.h:119
#define TRACE(s)
Definition: solgame.cpp:4
#define MAXWAVEDRIVERS
Definition: mmddk.h:33
BOOL WINAPI GetModuleHandleExW(IN DWORD dwFlags, IN LPCWSTR lpwModuleName OPTIONAL, OUT HMODULE *phModule)
Definition: loader.c:875
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:41
DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS]
Definition: capture.c:965

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 680 of file dsound_main.c.

681 {
683 }
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
static HINSTANCE instance
Definition: dsound_main.c:82

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 688 of file dsound_main.c.

689 {
691 }
static HINSTANCE instance
Definition: dsound_main.c:82
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ DSCF_AddRef()

static ULONG WINAPI DSCF_AddRef ( LPCLASSFACTORY  iface)
static

Definition at line 520 of file dsound_main.c.

521 {
522  return 2;
523 }

Referenced by DllGetClassObject().

◆ DSCF_CreateInstance()

static HRESULT WINAPI DSCF_CreateInstance ( LPCLASSFACTORY  iface,
LPUNKNOWN  pOuter,
REFIID  riid,
LPVOID ppobj 
)
static

Definition at line 531 of file dsound_main.c.

536 {
538  TRACE("(%p, %p, %s, %p)\n", This, pOuter, debugstr_guid(riid), ppobj);
539 
540  if (pOuter)
541  return CLASS_E_NOAGGREGATION;
542 
543  if (ppobj == NULL) {
544  WARN("invalid parameter\n");
545  return DSERR_INVALIDPARAM;
546  }
547  *ppobj = NULL;
548  return This->pfnCreateInstance(riid, ppobj);
549 }
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: dsound_main.c:497

◆ DSCF_LockServer()

static HRESULT WINAPI DSCF_LockServer ( LPCLASSFACTORY  iface,
BOOL  dolock 
)
static

Definition at line 551 of file dsound_main.c.

552 {
554  FIXME("(%p, %d) stub!\n", This, dolock);
555  return S_OK;
556 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: dsound_main.c:497

◆ DSCF_QueryInterface()

static HRESULT WINAPI DSCF_QueryInterface ( LPCLASSFACTORY  iface,
REFIID  riid,
LPVOID ppobj 
)
static

Definition at line 503 of file dsound_main.c.

504 {
506  TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
507  if (ppobj == NULL)
508  return E_POINTER;
509  if (IsEqualIID(riid, &IID_IUnknown) ||
511  {
512  *ppobj = iface;
513  IUnknown_AddRef(iface);
514  return S_OK;
515  }
516  *ppobj = NULL;
517  return E_NOINTERFACE;
518 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: dsound_main.c:497
#define E_POINTER
Definition: winerror.h:2365
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ DSCF_Release()

static ULONG WINAPI DSCF_Release ( LPCLASSFACTORY  iface)
static

Definition at line 525 of file dsound_main.c.

526 {
527  /* static class, won't be freed */
528  return 1;
529 }

◆ get_config_key()

static DWORD get_config_key ( HKEY  defkey,
HKEY  appkey,
const char name,
char buffer,
DWORD  size 
)
inlinestatic

Definition at line 88 of file dsound_main.c.

90 {
91  if (appkey && !RegQueryValueExA( appkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
92  if (defkey && !RegQueryValueExA( defkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
93  return ERROR_FILE_NOT_FOUND;
94 }
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
GLuint buffer
Definition: glext.h:5915
unsigned char * LPBYTE
Definition: typedefs.h:52
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLsizeiptr size
Definition: glext.h:5919
Definition: name.c:36

Referenced by setup_dsound_options().

◆ get_device_id()

static const char* get_device_id ( LPCGUID  pGuid)
static

Definition at line 189 of file dsound_main.c.

190 {
191  if (IsEqualGUID(&DSDEVID_DefaultPlayback, pGuid))
192  return "DSDEVID_DefaultPlayback";
193  else if (IsEqualGUID(&DSDEVID_DefaultVoicePlayback, pGuid))
194  return "DSDEVID_DefaultVoicePlayback";
195  else if (IsEqualGUID(&DSDEVID_DefaultCapture, pGuid))
196  return "DSDEVID_DefaultCapture";
197  else if (IsEqualGUID(&DSDEVID_DefaultVoiceCapture, pGuid))
198  return "DSDEVID_DefaultVoiceCapture";
199  return debugstr_guid(pGuid);
200 }
#define debugstr_guid
Definition: kernel32.h:35
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

Referenced by GetDeviceID().

◆ GetDeviceID()

HRESULT WINAPI GetDeviceID ( LPCGUID  pGuidSrc,
LPGUID  pGuidDest 
)

Definition at line 222 of file dsound_main.c.

223 {
224  TRACE("(%s,%p)\n", get_device_id(pGuidSrc),pGuidDest);
225 
226  if ( pGuidSrc == NULL) {
227  WARN("invalid parameter: pGuidSrc == NULL\n");
228  return DSERR_INVALIDPARAM;
229  }
230 
231  if ( pGuidDest == NULL ) {
232  WARN("invalid parameter: pGuidDest == NULL\n");
233  return DSERR_INVALIDPARAM;
234  }
235 
236  if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
237  IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
239  TRACE("returns %s\n", get_device_id(pGuidDest));
240  return DS_OK;
241  }
242 
243  if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
244  IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
246  TRACE("returns %s\n", get_device_id(pGuidDest));
247  return DS_OK;
248  }
249 
250  *pGuidDest = *pGuidSrc;
251  TRACE("returns %s\n", get_device_id(pGuidDest));
252 
253  return DS_OK;
254 }
#define WARN(fmt,...)
Definition: debug.h:111
static int ds_default_playback
Definition: dsound_main.c:80
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:42
smooth NULL
Definition: ftsmooth.c:416
#define DS_OK
Definition: dsound.h:116
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static int ds_default_capture
Definition: dsound_main.c:81
static const char * get_device_id(LPCGUID pGuid)
Definition: dsound_main.c:189
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]
Definition: dsound_main.c:41

Referenced by DirectSoundCaptureEnumerateW(), and DirectSoundEnumerateW().

◆ impl_from_IClassFactory()

static IClassFactoryImpl* impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 497 of file dsound_main.c.

498 {
499  return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
500 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by DSCF_CreateInstance(), DSCF_LockServer(), and DSCF_QueryInterface().

◆ mmErr()

HRESULT mmErr ( UINT  err)

Definition at line 44 of file dsound_main.c.

45 {
46  switch(err) {
47  case MMSYSERR_NOERROR:
48  return DS_OK;
49  case MMSYSERR_ALLOCATED:
50  return DSERR_ALLOCATED;
51  case MMSYSERR_ERROR:
54  return DSERR_GENERIC; /* FIXME */
55  case MMSYSERR_NODRIVER:
56  return DSERR_NODRIVER;
57  case MMSYSERR_NOMEM:
58  return DSERR_OUTOFMEMORY;
60  case WAVERR_BADFORMAT:
61  case WAVERR_UNPREPARED:
62  return DSERR_INVALIDPARAM;
64  return DSERR_UNSUPPORTED;
65  default:
66  FIXME("Unknown MMSYS error %d\n",err);
67  return DSERR_GENERIC;
68  }
69 }
#define WAVERR_BADFORMAT
Definition: mmsystem.h:176
#define DSERR_GENERIC
Definition: dsound.h:123
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
#define DSERR_OUTOFMEMORY
Definition: dsound.h:125
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
#define WAVERR_STILLPLAYING
Definition: mmsystem.h:177
#define FIXME(fmt,...)
Definition: debug.h:110
#define DSERR_NODRIVER
Definition: dsound.h:128
#define DS_OK
Definition: dsound.h:116
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define MMSYSERR_ALLOCATED
Definition: mmsystem.h:100
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define DSERR_UNSUPPORTED
Definition: dsound.h:127
#define err(...)
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define WAVERR_UNPREPARED
Definition: mmsystem.h:178
#define DSERR_ALLOCATED
Definition: dsound.h:119

Referenced by DirectSoundCaptureDevice_Initialize(), DirectSoundCaptureEnumerateW(), DirectSoundDevice_Initialize(), DirectSoundEnumerateW(), DSOUND_PrimaryOpen(), DSOUND_PrimaryPlay(), DSOUND_PrimaryStop(), DSOUND_ReopenDevice(), IDirectSoundCaptureBufferImpl_Create(), IDirectSoundCaptureBufferImpl_Start(), and IDirectSoundCaptureBufferImpl_Stop().

◆ setup_dsound_options()

void setup_dsound_options ( void  )

Definition at line 101 of file dsound_main.c.

102 {
103  char buffer[MAX_PATH+16];
104  HKEY hkey, appkey = 0;
105  DWORD len;
106 
107  buffer[MAX_PATH]='\0';
108 
109  /* @@ Wine registry key: HKCU\Software\Wine\DirectSound */
110  if (RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\DirectSound", &hkey )) hkey = 0;
111 
113  if (len && len < MAX_PATH)
114  {
115  HKEY tmpkey;
116  /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\DirectSound */
117  if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey ))
118  {
119  char *p, *appname = buffer;
120  if ((p = strrchr( appname, '/' ))) appname = p + 1;
121  if ((p = strrchr( appname, '\\' ))) appname = p + 1;
122  strcat( appname, "\\DirectSound" );
123  TRACE("appname = [%s]\n", appname);
124  if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
125  RegCloseKey( tmpkey );
126  }
127  }
128 
129  /* get options */
130 
131  if (!get_config_key( hkey, appkey, "EmulDriver", buffer, MAX_PATH ))
132  ds_emuldriver = strcmp(buffer, "N");
133 
134  if (!get_config_key( hkey, appkey, "HelBuflen", buffer, MAX_PATH ))
136 
137  if (!get_config_key( hkey, appkey, "SndQueueMax", buffer, MAX_PATH ))
139 
140  if (!get_config_key( hkey, appkey, "SndQueueMin", buffer, MAX_PATH ))
142 
143  if (!get_config_key( hkey, appkey, "HardwareAcceleration", buffer, MAX_PATH )) {
144  if (strcmp(buffer, "Full") == 0)
146  else if (strcmp(buffer, "Standard") == 0)
148  else if (strcmp(buffer, "Basic") == 0)
150  else if (strcmp(buffer, "Emulation") == 0)
152  }
153 
154  if (!get_config_key( hkey, appkey, "DefaultPlayback", buffer, MAX_PATH ))
156 
157  if (!get_config_key( hkey, appkey, "MaxShadowSize", buffer, MAX_PATH ))
159 
160  if (!get_config_key( hkey, appkey, "DefaultCapture", buffer, MAX_PATH ))
162 
163  if (!get_config_key( hkey, appkey, "DefaultSampleRate", buffer, MAX_PATH ))
165 
166  if (!get_config_key( hkey, appkey, "DefaultBitsPerSample", buffer, MAX_PATH ))
168 
169  if (appkey) RegCloseKey( appkey );
170  if (hkey) RegCloseKey( hkey );
171 
172  TRACE("ds_emuldriver = %d\n", ds_emuldriver);
173  TRACE("ds_hel_buflen = %d\n", ds_hel_buflen);
174  TRACE("ds_snd_queue_max = %d\n", ds_snd_queue_max);
175  TRACE("ds_snd_queue_min = %d\n", ds_snd_queue_min);
176  TRACE("ds_hw_accel = %s\n",
177  ds_hw_accel==DS_HW_ACCEL_FULL ? "Full" :
178  ds_hw_accel==DS_HW_ACCEL_STANDARD ? "Standard" :
179  ds_hw_accel==DS_HW_ACCEL_BASIC ? "Basic" :
180  ds_hw_accel==DS_HW_ACCEL_EMULATION ? "Emulation" :
181  "Unknown");
182  TRACE("ds_default_playback = %d\n", ds_default_playback);
183  TRACE("ds_default_capture = %d\n", ds_default_playback);
184  TRACE("ds_default_sample_rate = %d\n", ds_default_sample_rate);
185  TRACE("ds_default_bits_per_sample = %d\n", ds_default_bits_per_sample);
186  TRACE("ds_snd_shadow_maxsize = %d\n", ds_snd_shadow_maxsize);
187 }
static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
Definition: dsound_main.c:88
int ds_snd_queue_min
Definition: dsound_main.c:75
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3257
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
int ds_emuldriver
Definition: dsound_main.c:72
#define HKEY_CURRENT_USER
Definition: winreg.h:11
GLuint buffer
Definition: glext.h:5915
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:548
static int ds_default_playback
Definition: dsound_main.c:80
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define DS_HW_ACCEL_EMULATION
#define TRACE(s)
Definition: solgame.cpp:4
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define DS_HW_ACCEL_STANDARD
int ds_hel_buflen
Definition: dsound_main.c:73
int ds_default_sample_rate
Definition: dsound_main.c:78
#define DS_HW_ACCEL_FULL
int ds_snd_queue_max
Definition: dsound_main.c:74
static int ds_default_capture
Definition: dsound_main.c:81
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int ds_snd_shadow_maxsize
Definition: dsound_main.c:76
int ds_default_bits_per_sample
Definition: dsound_main.c:79
GLfloat GLfloat p
Definition: glext.h:8902
#define DS_HW_ACCEL_BASIC
int ds_hw_accel
Definition: dsound_main.c:77

Referenced by DirectSoundCaptureEnumerateW(), DirectSoundEnumerateW(), DSOUND_CaptureCreate(), DSOUND_CaptureCreate8(), DSOUND_Create(), DSOUND_Create8(), DSOUND_FullDuplexCreate(), and DSPROPERTY_DescriptionW().

Variable Documentation

◆ ds_default_bits_per_sample

int ds_default_bits_per_sample = 16

Definition at line 79 of file dsound_main.c.

Referenced by DirectSoundDevice_Create(), and setup_dsound_options().

◆ ds_default_capture

int ds_default_capture
static

Definition at line 81 of file dsound_main.c.

Referenced by GetDeviceID(), and setup_dsound_options().

◆ ds_default_playback

int ds_default_playback
static

Definition at line 80 of file dsound_main.c.

Referenced by GetDeviceID(), and setup_dsound_options().

◆ ds_default_sample_rate

int ds_default_sample_rate = 44100

Definition at line 78 of file dsound_main.c.

Referenced by DirectSoundDevice_Create(), and setup_dsound_options().

◆ ds_emuldriver

int ds_emuldriver = 0

Definition at line 72 of file dsound_main.c.

Referenced by DirectSoundDevice_Initialize(), and setup_dsound_options().

◆ ds_hel_buflen

int ds_hel_buflen = 32768 * 2

Definition at line 73 of file dsound_main.c.

Referenced by DSOUND_PrimaryCreate(), DSOUND_PrimaryOpen(), and setup_dsound_options().

◆ ds_hw_accel

◆ ds_snd_queue_max

int ds_snd_queue_max = 10

◆ ds_snd_queue_min

int ds_snd_queue_min = 6

Definition at line 75 of file dsound_main.c.

Referenced by DSOUND_PrimaryOpen(), and setup_dsound_options().

◆ ds_snd_shadow_maxsize

int ds_snd_shadow_maxsize = 2

Definition at line 76 of file dsound_main.c.

Referenced by DSOUND_RecalcFormat(), and setup_dsound_options().

◆ DSCF_Vtbl

const IClassFactoryVtbl DSCF_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI DSCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
Definition: dsound_main.c:503
static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
Definition: dsound_main.c:531
static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
Definition: dsound_main.c:551
static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
Definition: dsound_main.c:520
static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
Definition: dsound_main.c:525

Definition at line 558 of file dsound_main.c.

◆ DSOUND_capture_guids

◆ DSOUND_CF

IClassFactoryImpl DSOUND_CF[]
static
Initial value:
= {
{ { &DSCF_Vtbl }, &CLSID_DirectSound, (FnCreateInstance)DSOUND_Create },
{ { &DSCF_Vtbl }, &CLSID_DirectSound8, (FnCreateInstance)DSOUND_Create8 },
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture, (FnCreateInstance)DSOUND_CaptureCreate },
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture8, (FnCreateInstance)DSOUND_CaptureCreate8 },
{ { &DSCF_Vtbl }, &CLSID_DirectSoundFullDuplex, (FnCreateInstance)DSOUND_FullDuplexCreate },
{ { &DSCF_Vtbl }, &CLSID_DirectSoundPrivate, (FnCreateInstance)IKsPrivatePropertySetImpl_Create },
{ { NULL }, NULL, NULL }
}
HRESULT(* FnCreateInstance)(REFIID riid, LPVOID *ppobj)
Definition: dsound_main.c:489
HRESULT DSOUND_Create8(REFIID riid, LPDIRECTSOUND8 *ppDS)
Definition: dsound.c:1050
HRESULT DSOUND_CaptureCreate8(REFIID riid, LPDIRECTSOUNDCAPTURE8 *ppDSC8)
Definition: capture.c:1359
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, IKsPropertySet **piks) DECLSPEC_HIDDEN
Definition: propset.c:615
HRESULT DSOUND_Create(REFIID riid, LPDIRECTSOUND *ppDS)
Definition: dsound.c:963
smooth NULL
Definition: ftsmooth.c:416
HRESULT DSOUND_CaptureCreate(REFIID riid, LPDIRECTSOUNDCAPTURE *ppDSC)
Definition: capture.c:1330
static const IClassFactoryVtbl DSCF_Vtbl
Definition: dsound_main.c:558
HRESULT DSOUND_FullDuplexCreate(REFIID riid, LPDIRECTSOUNDFULLDUPLEX *ppDSFD) DECLSPEC_HIDDEN
Definition: duplex.c:604

Definition at line 566 of file dsound_main.c.

Referenced by DllGetClassObject().

◆ DSOUND_renderer

DirectSoundDevice * DSOUND_renderer

◆ DSOUND_renderer_guids

◆ helpstring

struct morecontext helpstring

◆ instance

HINSTANCE instance
static

Definition at line 82 of file dsound_main.c.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().