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.

75 lines
2.9 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dscrecd.h
  6. * Content: Definition of the CDirectSoundCaptureRecordDevice class
  7. *
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 07/16/99 rodtoll Created
  12. * 07/30/99 rodtoll Updated to allow creation of object using a pre-created
  13. * DirectSoundCapture Object.
  14. * 08/04/99 rodtoll Added member to retrieve DSC object
  15. * 11/12/99 rodtoll Modified abstraction for new waveIN support.
  16. * Now abstracted types look almost like dsoundcap objects
  17. * 11/22/99 rodtoll Added code to map from GUID to waveIN device
  18. * ID for non-millenium systems.
  19. * 11/23/99 rodtoll Updated to use waveIn device ID or DSound 7.1 when they are avail
  20. * 12/01/99 rodtoll Bug #115783 - Will always adjust volume of default device
  21. * Now uses new CMixerLine class for adjusting volumes/selecting mic
  22. * rodtoll New algorithm to map from GUIDs to device IDs if DSound 7.1 is not
  23. * available. Will map device correctly on DX7, will guess for other
  24. * DX versions < 7. However, default device is assumed to be waveIN ID #0.
  25. * 12/01/99 rodtoll Bug #115783 - Will always adjust volume of default device
  26. * Now uses new CMixerLine class for adjusting volumes/selecting mic
  27. * 12/08/99 rodtoll Bug #121054 - DirectX 7.1 support.
  28. * - Added hwndOwner param for capture focus support
  29. *
  30. ***************************************************************************/
  31. // DirectSoundCaptureRecordDevice.cpp
  32. //
  33. // This module contains the declaration of the DirectSoundCaptureRecordDevice
  34. // class. See the class definition below for a description
  35. //
  36. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  37. //
  38. #ifndef __DIRECTSOUNDCAPTURERECORDDEVICE_H
  39. #define __DIRECTSOUNDCAPTURERECORDDEVICE_H
  40. // CDirectSoundCaptureRecordDevice
  41. //
  42. // This class provides an implementation of the CAudioRecordDevice class which
  43. // uses the DirectSoundCapture API to talk to the recording hardware.
  44. //
  45. class CDirectSoundCaptureRecordDevice: public CAudioRecordDevice
  46. {
  47. public:
  48. CDirectSoundCaptureRecordDevice();
  49. virtual ~CDirectSoundCaptureRecordDevice();
  50. public: // Initialization
  51. HRESULT Initialize( const GUID &refguidDevice );
  52. HRESULT Initialize( LPDIRECTSOUNDCAPTURE lpdsc, const GUID &guidDevice );
  53. HRESULT CreateBuffer( LPDSCBUFFERDESC lpdscBufferDesc, HWND hwndOwner, DWORD dwFrameSize, CAudioRecordBuffer **lpapBuffer );
  54. LPDIRECTSOUNDCAPTURE GetCaptureDevice();
  55. HRESULT GetMixerQuality( DIRECTSOUNDMIXER_SRCQUALITY *psrcQuality );
  56. HRESULT SetMixerQuality( const DIRECTSOUNDMIXER_SRCQUALITY srcQuality );
  57. protected:
  58. HRESULT FindDeviceID();
  59. LPDIRECTSOUNDCAPTURE m_lpdscDirectSound; // DirectSoundCapture interface
  60. GUID m_guidDevice;
  61. UINT m_uiWaveDeviceID;
  62. };
  63. #endif