Windows NT 4.0 source code leak
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.

122 lines
2.5 KiB

4 years ago
  1. /*
  2. * Copyright (c) 1992 Microsoft Corporation
  3. */
  4. /*
  5. * declaration of interface functions to the OPL3 midi device type.
  6. *
  7. * These functions are called from midi.c when the kernel driver
  8. * has decreed that this is an opl3-compatible device.
  9. *
  10. * Geraint Davies, Dec 92
  11. */
  12. /*
  13. * Opl3_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 Opl3_NoteOn (BYTE bPatch,
  26. BYTE bNote, BYTE bChannel, BYTE bVelocity,
  27. short iBend);
  28. /* Opl3_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 Opl3_NoteOff (BYTE bPatch,
  39. BYTE bNote, BYTE bChannel);
  40. /* Opl3_AllNotesOff - turn off all notes
  41. *
  42. * inputs - none
  43. * returns - none
  44. */
  45. VOID Opl3_AllNotesOff(void);
  46. VOID Opl3_ChannelNotesOff(BYTE bChannel);
  47. /* Opl3_NewVolume - This should be called if a volume level
  48. * has changed. This will adjust the levels of all the playing
  49. * voices.
  50. *
  51. * inputs
  52. * WORD wLeft - left attenuation (1.5 db units)
  53. * WORD wRight - right attenuation (ignore if mono)
  54. * returns
  55. * none
  56. */
  57. VOID FAR PASCAL Opl3_NewVolume (WORD wLeft, WORD wRight);
  58. /* Opl3_ChannelVolume - set the volume level for an individual channel.
  59. *
  60. * inputs
  61. * BYTE bChannel - channel number to change
  62. * WORD wAtten - attenuation in 1.5 db units
  63. *
  64. * returns
  65. * none
  66. */
  67. VOID FAR PASCAL Opl3_ChannelVolume(BYTE bChannel, WORD wAtten);
  68. /* Opl3_SetPan - set the left-right pan position.
  69. *
  70. * inputs
  71. * BYTE bChannel - channel number to alter
  72. * BYTE bPan - 0 for left, 127 for right or somewhere in the middle.
  73. *
  74. * returns - none
  75. */
  76. VOID FAR PASCAL Opl3_SetPan(BYTE bChannel, BYTE bPan);
  77. /* Opl3_PitchBend - This pitch bends a channel.
  78. *
  79. * inputs
  80. * BYTE bChannel - channel
  81. * short iBend - Values from -32768 to 32767, being
  82. * -2 to +2 half steps
  83. * returns
  84. * none
  85. */
  86. VOID NEAR PASCAL Opl3_PitchBend (BYTE bChannel, short iBend);
  87. /* Opl3_BoardInit - initialise board and load patches as necessary.
  88. *
  89. * inputs - none
  90. * returns - 0 for success or the error code
  91. */
  92. WORD Opl3_BoardInit(void);
  93. /*
  94. * Opl3_BoardReset - silence the board and set all voices off.
  95. */
  96. VOID Opl3_BoardReset(void);