home *** CD-ROM | disk | FTP | other *** search
/ Action Ware 12: Heretic & Hexen / actionware12.iso / acware12 / sounds / mus_play / adlib.h < prev    next >
C/C++ Source or Header  |  1994-10-30  |  2KB  |  76 lines

  1. /*
  2.  *    Name:        Adlib interface module -- Header Include File
  3.  *    Version:    1.40
  4.  *    Author:        Vladimir Arnost (QA-Software)
  5.  *    Last revision:    Oct-30-1994
  6.  *    Compiler:    Borland C++ 3.1
  7.  *
  8.  */
  9.  
  10. /*
  11.  * Revision History:
  12.  *
  13.  *    Aug-8-1994    V1.00    V.Arnost
  14.  *        Written from scratch
  15.  *    Aug-9-1994    V1.10    V.Arnost
  16.  *        Added stereo capabilities
  17.  *    Aug-13-1994    V1.20    V.Arnost
  18.  *        Stereo capabilities made functional
  19.  *    Aug-24-1994    V1.30    V.Arnost
  20.  *        Added Adlib and SB Pro II detection
  21.  *    Oct-30-1994    V1.40    V.Arnost
  22.  *        Added BLASTER variable parsing
  23.  */
  24.  
  25. #ifndef __ADLIB_H_
  26. #define __ADLIB_H_
  27.  
  28. #define ADLIBPORT 0x388
  29. #define SBPORT 0x228
  30. #define SBPROPORT 0x220
  31. #define ADLIBCHANNELS  9
  32. #define SBPROCHANNELS  18
  33. #define OUTPUTCHANNELS 18
  34.  
  35. /* Global type declarations */
  36.  
  37. #ifdef __386__
  38.  typedef unsigned long DWORD;
  39. #else
  40.  typedef unsigned char BYTE;
  41.  typedef unsigned int  WORD;
  42.  typedef unsigned long DWORD;
  43. #endif
  44.  
  45. extern WORD AdlibPort;
  46. extern WORD AdlibChannels;
  47. extern WORD AdlibStereo;
  48.  
  49. #ifdef __cplusplus
  50.   extern "C" {
  51. #endif
  52.  
  53. BYTE WriteReg(WORD reg, BYTE data);
  54. void WriteChannel(BYTE regbase, BYTE channel, BYTE data1, BYTE data2);
  55. void WriteValue(BYTE regbase, BYTE channel, BYTE value);
  56. BYTE convertVolume(BYTE data, WORD volume);
  57. BYTE panVolume(WORD volume, int pan);
  58. void WriteFreq(BYTE channel, WORD freq, BYTE octave, BYTE keyon);
  59. void WriteVolume(BYTE channel, BYTE data[16], WORD volume);
  60. void WritePan(BYTE channel, BYTE data[16], int pan);
  61. void WriteInstrument(BYTE channel, BYTE data[16]);
  62. void InitAdlib(WORD port, WORD stereo);
  63. void DeinitAdlib(void);
  64. void SetMixer(BYTE index, BYTE data);
  65. int  GetMixer(BYTE index);
  66. int  DetectMixer(WORD port);
  67. int  DetectAdlib(WORD port);
  68. int  DetectSBProII(WORD port);
  69. int  DetectBlaster(WORD *port, BYTE *irq, BYTE *dma, BYTE *type);
  70.  
  71. #ifdef __cplusplus
  72.   }
  73. #endif
  74.  
  75. #endif // __ADLIB_H_
  76.