Source code of Windows XP (NT5)
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.

123 lines
2.5 KiB

  1. /*
  2. * Copyright (c) 1992-1994 Microsoft Corporation
  3. */
  4. /*
  5. * definition of interface functions to the adlib midi device type.
  6. *
  7. * These functions are called from midi.c when the kernel driver
  8. * has decreed that this is an adlib-compatible device.
  9. *
  10. * Geraint Davies, Dec 92
  11. */
  12. /*
  13. * Adlib_NoteOn - This turns a note on. (Including drums, with
  14. * a patch # of the drum Note + 128)
  15. *
  16. * inputs
  17. * BYTE bPatch - MIDI patch number
  18. * BYTE bNote - MIDI note number
  19. * BYTE bChannel - MIDI channel #
  20. * BYTE bVelocity - Velocity #
  21. * short iBend - current pitch bend from -32768, to 32767
  22. * returns
  23. * none
  24. */
  25. VOID NEAR PASCAL Adlib_NoteOn (BYTE bPatch,
  26. BYTE bNote, BYTE bChannel, BYTE bVelocity,
  27. short iBend);
  28. /* Adlib_NoteOff - This turns a note off. (Including drums,
  29. * with a patch # of the drum note + 128)
  30. *
  31. * inputs
  32. * BYTE bPatch - MIDI patch #
  33. * BYTE bNote - MIDI note number
  34. * BYTE bChannel - MIDI channel #
  35. * returns
  36. * none
  37. */
  38. VOID FAR PASCAL Adlib_NoteOff (BYTE bPatch,
  39. BYTE bNote, BYTE bChannel);
  40. /* Adlib_AllNotesOff - turn off all notes
  41. *
  42. * inputs - none
  43. * returns - none
  44. */
  45. VOID Adlib_AllNotesOff(void);
  46. /* Adlib_NewVolume - This should be called if a volume level
  47. * has changed. This will adjust the levels of all the playing
  48. * voices.
  49. *
  50. * inputs
  51. * WORD wLeft - left attenuation (1.5 db units)
  52. * WORD wRight - right attenuation (ignore if mono)
  53. * returns
  54. * none
  55. */
  56. VOID FAR PASCAL Adlib_NewVolume (WORD wLeft, WORD wRight);
  57. /* Adlib_ChannelVolume - set the volume level for an individual channel.
  58. *
  59. * inputs
  60. * BYTE bChannel - channel number to change
  61. * WORD wAtten - attenuation in 1.5 db units
  62. *
  63. * returns
  64. * none
  65. */
  66. VOID FAR PASCAL Adlib_ChannelVolume(BYTE bChannel, WORD wAtten);
  67. /* Adlib_SetPan - set the left-right pan position.
  68. *
  69. * inputs
  70. * BYTE bChannel - channel number to alter
  71. * BYTE bPan - 0 for left, 127 for right or somewhere in the middle.
  72. *
  73. * returns - none
  74. */
  75. VOID FAR PASCAL Adlib_SetPan(BYTE bChannel, BYTE bPan);
  76. /* Adlib_PitchBend - This pitch bends a channel.
  77. *
  78. * inputs
  79. * BYTE bChannel - channel
  80. * short iBend - Values from -32768 to 32767, being
  81. * -2 to +2 half steps
  82. * returns
  83. * none
  84. */
  85. VOID NEAR PASCAL Adlib_PitchBend (BYTE bChannel, short iBend);
  86. /* Adlib_BoardInit - initialise board and load patches as necessary.
  87. *
  88. * inputs - none
  89. * returns - 0 for success or the error code
  90. */
  91. WORD Adlib_BoardInit(void);
  92. /*
  93. * Adlib_BoardReset - silence the board and set all voices off.
  94. */
  95. VOID Adlib_BoardReset(void);