home *** CD-ROM | disk | FTP | other *** search
/ PC Loisirs 18 / cd.iso / sharewar / mikm202 / source / include / mplayer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-18  |  2.6 KB  |  117 lines

  1. #ifndef MPLAYER_H
  2. #define MPLAYER_H
  3.  
  4. #include "mtypes.h"
  5.  
  6.  
  7. typedef struct ENVPR{
  8.     UBYTE flg;          // envelope flag
  9.     UBYTE pts;            // number of envelope points
  10.     UBYTE sus;            // envelope sustain index
  11.     UBYTE beg;            // envelope loop begin
  12.     UBYTE end;            // envelope loop end
  13.     WORD  p;            // current envelope counter
  14.     UWORD a;            // envelope index a
  15.     UWORD b;            // envelope index b
  16.     ENVPT *env;            // envelope points
  17. } ENVPR;
  18.  
  19.  
  20. typedef struct AUDTMP{
  21.     INSTRUMENT     *i;
  22.     SAMPLE      *s;
  23.  
  24.     WORD  fadevol;        // fading volume
  25.  
  26.     ENVPR venv;
  27.     ENVPR penv;
  28.  
  29.     UBYTE keyon;        // if true=key is pressed.
  30.     UBYTE kick;            // if true=sample has to be restarted
  31.     UBYTE sample;        // which sample number (0-31)
  32.     WORD  handle;        // which sample-handle
  33.  
  34.     ULONG start;        // The start byte index in the sample
  35.  
  36.     UBYTE panning;        // panning position
  37.     UBYTE pansspd;        // panslide speed
  38.  
  39.     BYTE  volume;        // amiga volume (0 t/m 64) to play the sample at
  40.     UWORD period;        // period to play the sample at
  41.  
  42.     /* You should not have to use the values
  43.        below in the player routine */
  44.  
  45.     BYTE  transpose;
  46.  
  47.     UBYTE note;            //
  48.  
  49.     WORD  ownper;
  50.     WORD  ownvol;
  51.  
  52.     UBYTE *row;            // row currently playing on this channel
  53.  
  54.     BYTE  retrig;        // retrig value (0 means don't retrig)
  55.     UWORD c2spd;        // what finetune to use
  56.  
  57.     BYTE  tmpvolume;    // tmp volume
  58.  
  59.     UWORD tmpperiod;    // tmp period
  60.     UWORD wantedperiod;    // period to slide to (with effect 3 or 5)
  61.  
  62.     UWORD slidespeed;    //
  63.     UWORD portspeed;    // noteslide speed (toneportamento)
  64.  
  65.     UBYTE s3mtremor;    // s3m tremor (effect I) counter
  66.  
  67.     UBYTE s3mvolslide;    // last used volslide
  68.  
  69.     UBYTE s3mrtgspeed;    // last used retrig speed
  70.     UBYTE s3mrtgslide;    // last used retrig slide
  71.  
  72.     UBYTE glissando;    // glissando (0 means off)
  73.     UBYTE wavecontrol;    //
  74.  
  75.     BYTE  vibpos;        // current vibrato position
  76.     UBYTE vibspd;        // "" speed
  77.     UBYTE vibdepth;        // "" depth
  78.  
  79.     BYTE  trmpos;        // current tremolo position
  80.     UBYTE trmspd;        // "" speed
  81.     UBYTE trmdepth;        // "" depth
  82.  
  83.     UWORD soffset;        // last used sample-offset (effect 9)
  84. } AUDTMP;
  85.  
  86.  
  87. extern AUDTMP mp_audio[32];        // max eight channels
  88. extern UBYTE  mp_bpm;            // beats-per-minute speed
  89. extern UWORD  mp_patpos;        // current row number (0-63)
  90. extern WORD   mp_sngpos;        // current song position
  91. extern UWORD  mp_sngspd;        // current songspeed
  92.  
  93. extern BOOL  mp_loop;
  94. extern BOOL  mp_panning;
  95. extern BOOL  mp_extspd;
  96. extern UBYTE mp_volume;
  97.  
  98. // Function prototypes:
  99.  
  100. #ifdef __cplusplus
  101. extern "C" {
  102. #endif
  103.  
  104. int     MP_Ready(void);
  105. void MP_NextPosition(void);
  106. void MP_PrevPosition(void);
  107. void MP_HandleTick(void);
  108. void MP_Init(UNIMOD *m);
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114.  
  115. #endif
  116.  
  117.