Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dsoundcaptureobj.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // dSoundCaptureObj.cpp : Implementation of CDirectApp and DLL registration.
  11. // DHF_DS entire file
  12. #define DIRECTSOUND_VERSION 0x600
  13. #include "stdafx.h"
  14. #include "Direct.h"
  15. #include "dSound.h"
  16. #include "dms.h"
  17. #include "dSoundObj.h"
  18. #include "dSoundCaptureObj.h"
  19. #include "dSoundCaptureBufferObj.h"
  20. CONSTRUCTOR(_dxj_DirectSoundCapture, {});
  21. DESTRUCTOR(_dxj_DirectSoundCapture, {});
  22. GETSET_OBJECT(_dxj_DirectSoundCapture);
  23. STDMETHODIMP C_dxj_DirectSoundCaptureObject::createCaptureBuffer(
  24. DSCBufferDesc *desc,I_dxj_DirectSoundCaptureBuffer **retval)
  25. {
  26. HRESULT hr = DD_OK;
  27. IDirectSoundCaptureBuffer *lpBuffer=NULL;
  28. DSCBUFFERDESC *realDesc=(DSCBUFFERDESC*)desc;
  29. realDesc->dwSize=sizeof(DSCBUFFERDESC);
  30. desc->pFormat=(long)PtrToLong(&(desc->fxFormat)); //bugbug SUNDOWN
  31. hr=m__dxj_DirectSoundCapture->CreateCaptureBuffer(realDesc,&lpBuffer,NULL);
  32. if FAILED(hr) return hr;
  33. INTERNAL_CREATE(_dxj_DirectSoundCaptureBuffer, lpBuffer, retval);
  34. return hr;
  35. }
  36. STDMETHODIMP C_dxj_DirectSoundCaptureObject::getCaps(DSCCaps *caps){
  37. ((DSCCAPS*)caps)->dwSize=sizeof(DSCCAPS);
  38. return m__dxj_DirectSoundCapture->GetCaps((DSCCAPS*)caps);
  39. }