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.

80 lines
1.7 KiB

  1. //
  2. // bandinst.cpp
  3. //
  4. // Copyright (c) 1997-1998 Microsoft Corporation. All rights reserved.
  5. //
  6. // Note: Originally written by Robert K. Amenn
  7. //
  8. #include "debug.h"
  9. #include "bandinst.h"
  10. //////////////////////////////////////////////////////////////////////
  11. // Class CDownloadedInstrument
  12. //////////////////////////////////////////////////////////////////////
  13. // CDownloadedInstrument::CDownloadedInstrument
  14. CDownloadedInstrument::~CDownloadedInstrument()
  15. {
  16. if(m_pDLInstrument)
  17. {
  18. if (m_pPort)
  19. {
  20. if (FAILED(m_pPort->UnloadInstrument(m_pDLInstrument)))
  21. {
  22. Trace(1,"Error: UnloadInstrument failed\n");
  23. }
  24. }
  25. m_pDLInstrument->Release();
  26. }
  27. if(m_pPort)
  28. {
  29. m_pPort->Release();
  30. }
  31. }
  32. //////////////////////////////////////////////////////////////////////
  33. // Class CBandInstrument
  34. //////////////////////////////////////////////////////////////////////
  35. // CBandInstrument::CBandInstrument
  36. CBandInstrument::CBandInstrument()
  37. {
  38. m_dwPatch = 0;
  39. m_dwAssignPatch = 0;
  40. m_bPan = 0;
  41. m_bVolume = 0;
  42. m_dwPChannel = 0;
  43. m_dwFlags = 0;
  44. m_nTranspose = 0;
  45. m_fGMOnly = false;
  46. m_fNotInFile = false;
  47. m_pIDMCollection = NULL;
  48. ZeroMemory(m_dwNoteRanges, sizeof(m_dwNoteRanges));
  49. }
  50. //////////////////////////////////////////////////////////////////////
  51. // CBandInstrument::~CBandInstrument
  52. CBandInstrument::~CBandInstrument()
  53. {
  54. if(m_pIDMCollection)
  55. {
  56. m_pIDMCollection->Release();
  57. }
  58. }
  59. void CDownloadList::Clear()
  60. {
  61. CDownloadedInstrument *pDownload;
  62. while (pDownload = RemoveHead())
  63. {
  64. delete pDownload;
  65. }
  66. }