home *** CD-ROM | disk | FTP | other *** search
/ ftp.4front-tech.com / ftp.4front-tech.com.tar / ftp.4front-tech.com / ossfree / snd-util-3.8.tar.gz / snd-util-3.8.tar / sndkit / dsp / str / str.h < prev    next >
C/C++ Source or Header  |  1980-01-01  |  2KB  |  69 lines

  1. #define FALSE            0
  2. #define TRUE            1
  3.  
  4. /* Default device for output */
  5. #define AUDIONAME        "/dev/dsp"
  6.  
  7. #define ZCAT            "/usr/bin/zcat"
  8.  
  9. /* Playback frequency in Hertz:
  10.  *
  11.  * 386SX  ->  8000 (or 4000)
  12.  * 386/25 -> 12000
  13.  * 486/50 -> 23000
  14.  */
  15. #define DEFAULT_DSP_SPEED    44100
  16.  
  17. #define DSP_DEFAULT_STEREO    TRUE
  18.  
  19. /* The default sample size can be 8 or 16 bits/sample */
  20. #define DSP_DEFAULT_SAMPLESIZE    8
  21.  
  22. typedef struct {        /*************************************/
  23.     char *info;            /* Sample data as a series of bytes  */
  24.     unsigned int length;    /* Length of sample in bytes         */
  25.     int volume;            /* Default volume 0-64 (min-max)     */
  26.     unsigned int rep_start;    /* Byte offset of repeat start         */
  27.     unsigned int rep_end;    /* Byte offset of repeat end         */
  28. } Voice;            /*************************************/
  29.  
  30. typedef struct {        /*************************************/
  31.     int period[64][4];        /* Period (pitch) of note         */
  32.     char sample[64][4];        /* Sample number to use             */
  33.     char effect[64][4];        /* Effect number (command)         */
  34.     unsigned char params[64][4];/* Effect parameters             */
  35. } Pattern;            /*************************************/
  36.  
  37. typedef struct {        /*************************************/
  38.     unsigned int pointer;    /* Current position in sample         */
  39.     unsigned int step;        /* Sample offset increment         */
  40.     int samp;            /* Number of sample currently used   */
  41.     int pitch;            /* Current pitch             */
  42.     int volume;            /* Volume of current note (0-64)     */
  43.     int doarp;            /* TRUE if doing arpeggio         */
  44.     int arp[3];            /*   The three notes in the arpeggio */
  45.     int doslide;        /* TRUE if doing slide             */
  46.     int slide;            /*   Slide speed and direction         */
  47.     int doporta;        /* TRUE if doing portamento         */
  48.     int pitchgoal;        /*   Pitch to reach             */
  49.     int portarate;        /*   Rate at which to approach pitch */
  50.     int dovib;            /* TRUE if doing vibrato         */
  51.     int vibspeed;        /*   Speed of vibrato 0-15 << 2         */
  52.     int vibamp;            /*   Amplitude 0-15             */
  53.     int viboffs;        /*   Current offset in sine wave     */
  54.     int doslidevol;        /* TRUE if doing volume slide         */
  55.     int volslide;        /*   Slide speed 0-64             */
  56. } Channel;            /*************************************/
  57.  
  58. #define MIN(a, b)        ((a) < (b) ? (a) : (b))
  59. #define MAX(a, b)        ((a) > (b) ? (a) : (b))
  60.  
  61. #define ABUF_SIZE        abuf_size
  62.  
  63. #ifndef EXIT_SUCCESS
  64. #define EXIT_SUCCESS        0
  65. #endif
  66. #ifndef EXIT_FAILURE
  67. #define EXIT_FAILURE        1
  68. #endif
  69.