home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / GameSmith1-Hisoft-System.DMS / in.adf / GDS_System.lha / include / sound / sound.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-29  |  1.5 KB  |  39 lines

  1. #ifndef GS_SOUND
  2. #define GS_SOUND
  3.  
  4. struct sound_struct
  5.   {
  6.   unsigned char *data;        /* ptr to sound data */
  7.   unsigned char *loop;        /* ptr to loop portion of sound data (echo) */
  8.   unsigned long length;       /* length of sound data (in 16 bit words) */
  9.   unsigned short repeat;      /* number of times to play the sample */
  10.   unsigned short count;       /* running total of number of times sample played */
  11.   unsigned short period;      /* tone of the sound (note value) */
  12.   unsigned short volume;      /* volume to play the sample (0 - 64) */
  13.   unsigned short type;        /* sample type (SND_EFX) */
  14.   unsigned short flags;       /* sample flags */
  15.   short volfade;              /* volume fade value (0 for no fade) */
  16.   unsigned short volcnt;      /* number of interrupts before volume decrement, or 0 */
  17.                               /* for fade only after every play of sample */
  18.   short perfade;              /* period fade value (0 for no fade) */
  19.   unsigned short percnt;      /* number of interrupts before period decrement, or 0 */
  20.                               /* for fade only after every play of sample */
  21.   };
  22.  
  23. /* the sound types */
  24.  
  25. #define SND_EFX  3            /* only supported sound type as yet */
  26.  
  27. /* the sound flags */
  28.  
  29. #define SND_FAST 1              /* sound data resides in fast RAM */
  30.  
  31. /* Amiga sound channels */
  32.  
  33. #define CHANNEL0 1            /* sound channel 0 */
  34. #define CHANNEL1 2            /* sound channel 1 */
  35. #define CHANNEL2 4            /* sound channel 2 */
  36. #define CHANNEL3 8            /* sound channel 3 */
  37.  
  38. #endif
  39.