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.

85 lines
1.5 KiB

  1. // Copyright (c) 1998 Microsoft Corporation
  2. //
  3. // syslink.cpp
  4. //
  5. #include "common.h"
  6. #include <mmsystem.h>
  7. CSysLink::CSysLink()
  8. {
  9. m_cRef = 1;
  10. }
  11. CSysLink::~CSysLink()
  12. {
  13. }
  14. STDMETHODIMP CSysLink::QueryInterface(const IID &iid, void **ppv)
  15. {
  16. if (IsEqualGUIDAligned(iid, IID_IUnknown))
  17. {
  18. *ppv = PVOID(PUNKNOWN(this));
  19. }
  20. else if (IsEqualGUIDAligned(iid, IID_IDirectMusicSynthSink))
  21. {
  22. *ppv = PVOID(PDIRECTMUSICSYNTHSINK(this));
  23. }
  24. else
  25. {
  26. return E_NOINTERFACE;
  27. }
  28. return S_OK;
  29. }
  30. STDMETHODIMP_(ULONG) CSysLink::AddRef()
  31. {
  32. return InterlockedIncrement(&m_cRef);
  33. }
  34. STDMETHODIMP_(ULONG) CSysLink::Release()
  35. {
  36. if (InterlockedDecrement(&m_cRef) == 0)
  37. {
  38. delete this;
  39. return 0;
  40. }
  41. return m_cRef;
  42. }
  43. STDMETHODIMP CSysLink::Init(CSynth *pSynth)
  44. {
  45. return S_OK;
  46. }
  47. STDMETHODIMP CSysLink::SetFormat(LPCWAVEFORMATEX pWaveFormat)
  48. {
  49. return S_OK;
  50. }
  51. STDMETHODIMP CSysLink::SetMasterClock(IReferenceClock *pClock)
  52. {
  53. return S_OK;
  54. }
  55. STDMETHODIMP CSysLink::GetLatencyClock(IReferenceClock **ppClock)
  56. {
  57. return S_OK;
  58. }
  59. STDMETHODIMP CSysLink::Activate(HWND hWnd, BOOL fEnable)
  60. {
  61. return S_OK;
  62. }
  63. STDMETHODIMP CSysLink::SampleToRefTime(LONGLONG llSampleTime,REFERENCE_TIME *prfTime)
  64. {
  65. return S_OK;
  66. }
  67. STDMETHODIMP CSysLink::RefTimeToSample(REFERENCE_TIME rfTime, LONGLONG *pllSampleTime)
  68. {
  69. return S_OK;
  70. }