Diff for /np2/sound/vermouth/midvoice.c between versions 1.3 and 1.4

version 1.3, 2005/02/07 14:46:13 version 1.4, 2006/12/16 12:11:07
Line 25 Line 25
   
 // ---- vibrate  // ---- vibrate
   
 static int vibrate_update(VOICE v) {  static int VERMOUTHCL vibrate_update(VOICE v) {
   
         int             depth;          int             depth;
         int             phase;          int             phase;
Line 52  static int vibrate_update(VOICE v) { Line 52  static int vibrate_update(VOICE v) {
         return((int)(step * (float)(1 << FREQ_SHIFT)));          return((int)(step * (float)(1 << FREQ_SHIFT)));
 }  }
   
 static SAMPLE resample_vibrate(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_vibrate(VOICE v, SAMPLE dst,
                                                                                                                           SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         SAMPLE  dstbreak;          SAMPLE  dstbreak;
Line 109  static SAMPLE resample_vibrate(VOICE v,  Line 110  static SAMPLE resample_vibrate(VOICE v, 
         return(dst);          return(dst);
 }  }
   
 static SAMPLE resample_vibloop(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_vibloop(VOICE v, SAMPLE dst,
                                                                                                                           SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         SAMPLE  dstbreak;          SAMPLE  dstbreak;
Line 161  static SAMPLE resample_vibloop(VOICE v,  Line 163  static SAMPLE resample_vibloop(VOICE v, 
         return(dst);          return(dst);
 }  }
   
 static SAMPLE resample_vibround(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_vibround(VOICE v, SAMPLE dst,
                                                                                                                           SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         SAMPLE  dstbreak;          SAMPLE  dstbreak;
Line 269  rr_done: Line 272  rr_done:
   
 // ---- normal  // ---- normal
   
 static SAMPLE resample_normal(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_normal(VOICE v, SAMPLE dst, SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         int             pos;          int             pos;
Line 298  static SAMPLE resample_normal(VOICE v, S Line 301  static SAMPLE resample_normal(VOICE v, S
         return(dst);          return(dst);
 }  }
   
 static SAMPLE resample_loop(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_loop(VOICE v, SAMPLE dst, SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         int             pos;          int             pos;
Line 321  static SAMPLE resample_loop(VOICE v, SAM Line 324  static SAMPLE resample_loop(VOICE v, SAM
         return(dst);          return(dst);
 }  }
   
 static SAMPLE resample_round(VOICE v, SAMPLE dst, SAMPLE dstterm) {  static SAMPLE VERMOUTHCL resample_round(VOICE v, SAMPLE dst, SAMPLE dstterm) {
   
         SAMPLE  src;          SAMPLE  src;
         int             pos;          int             pos;
Line 376  rr_done: Line 379  rr_done:
   
 // ----  // ----
   
 int envlope_setphase(VOICE v, int phase) {  int VERMOUTHCL envlope_setphase(VOICE v, int phase) {
   
         do {          do {
                 if (phase >= 6) {                  if (phase >= 6) {
Line 402  int envlope_setphase(VOICE v, int phase) Line 405  int envlope_setphase(VOICE v, int phase)
         return(0);          return(0);
 }  }
   
 void envelope_updates(VOICE v) {  void VERMOUTHCL envelope_updates(VOICE v) {
   
         int             envl;          int             envl;
         int             envr;          int             envr;
Line 457  void envelope_updates(VOICE v) { Line 460  void envelope_updates(VOICE v) {
 }  }
   
 #if defined(ENABLE_TREMOLO)  #if defined(ENABLE_TREMOLO)
 static void tremolo_update(VOICE v) {  static void VERMOUTHCL tremolo_update(VOICE v) {
   
         int             depth;          int             depth;
         int             cnt;          int             cnt;
Line 516  static int envelope_update(VOICE v) { Line 519  static int envelope_update(VOICE v) {
   
 // ---- release  // ---- release
   
 static void mixrel_normal(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixrel_normal(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         int             samples;          int             samples;
         SINT32  voll;          SINT32  voll;
Line 550  static void mixrel_normal(VOICE v, SINT3 Line 554  static void mixrel_normal(VOICE v, SINT3
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixrel_left(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixrel_left(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  vol;          SINT32  vol;
         SINT32  rel;          SINT32  rel;
Line 572  static void mixrel_left(VOICE v, SINT32  Line 577  static void mixrel_left(VOICE v, SINT32 
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixrel_right(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixrel_right(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         mixrel_left(v, dst + 1, src, srcterm);          mixrel_left(v, dst + 1, src, srcterm);
 }  }
   
 static void mixrel_centre(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixrel_centre(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  vol;          SINT32  vol;
         SINT32  rel;          SINT32  rel;
Line 605  static void mixrel_centre(VOICE v, SINT3 Line 612  static void mixrel_centre(VOICE v, SINT3
   
 // ---- normal  // ---- normal
   
 static void mixnor_normal(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixnor_normal(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  voll;          SINT32  voll;
         SINT32  volr;          SINT32  volr;
Line 621  static void mixnor_normal(VOICE v, SINT3 Line 629  static void mixnor_normal(VOICE v, SINT3
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixnor_left(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixnor_left(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  vol;          SINT32  vol;
         _SAMPLE s;          _SAMPLE s;
Line 634  static void mixnor_left(VOICE v, SINT32  Line 643  static void mixnor_left(VOICE v, SINT32 
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixnor_right(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixnor_right(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  vol;          SINT32  vol;
         _SAMPLE s;          _SAMPLE s;
Line 647  static void mixnor_right(VOICE v, SINT32 Line 657  static void mixnor_right(VOICE v, SINT32
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixnor_centre(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixnor_centre(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         SINT32  vol;          SINT32  vol;
         _SAMPLE s;          _SAMPLE s;
Line 666  static void mixnor_centre(VOICE v, SINT3 Line 677  static void mixnor_centre(VOICE v, SINT3
   
 // ---- env  // ---- env
   
 static void mixenv_normal(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixenv_normal(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         int             cnt;          int             cnt;
         SINT32  voll;          SINT32  voll;
Line 712  static void mixenv_normal(VOICE v, SINT3 Line 724  static void mixenv_normal(VOICE v, SINT3
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixenv_left(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixenv_left(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         int             cnt;          int             cnt;
         SINT32  vol;          SINT32  vol;
Line 753  static void mixenv_left(VOICE v, SINT32  Line 766  static void mixenv_left(VOICE v, SINT32 
         } while(src < srcterm);          } while(src < srcterm);
 }  }
   
 static void mixenv_right(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixenv_right(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         mixenv_left(v, dst + 1, src, srcterm);          mixenv_left(v, dst + 1, src, srcterm);
 }  }
   
 static void mixenv_centre(VOICE v, SINT32 *dst, SAMPLE src, SAMPLE srcterm) {  static void VERMOUTHCL mixenv_centre(VOICE v, SINT32 *dst, SAMPLE src,
                                                                                                                           SAMPLE srcterm) {
   
         int             cnt;          int             cnt;
         SINT32  vol;          SINT32  vol;
Line 814  static const RESPROC resproc[] = { Line 829  static const RESPROC resproc[] = {
 #endif  #endif
 };  };
   
 void voice_setphase(VOICE v, UINT8 phase) {  void VERMOUTHCL voice_setphase(VOICE v, UINT8 phase) {
   
         int             proc;          int             proc;
         int             mode;          int             mode;
Line 845  static const MIXPROC mixproc[] = { Line 860  static const MIXPROC mixproc[] = {
                         mixenv_normal,  mixenv_left,    mixenv_right,   mixenv_centre,                          mixenv_normal,  mixenv_left,    mixenv_right,   mixenv_centre,
                         mixrel_normal,  mixrel_left,    mixrel_right,   mixrel_centre};                          mixrel_normal,  mixrel_left,    mixrel_right,   mixrel_centre};
   
 void voice_setmix(VOICE v) {  void VERMOUTHCL voice_setmix(VOICE v) {
   
         int             proc;          int             proc;
   

Removed from v.1.3  
changed lines
  Added in v.1.4


RetroPC.NET-CVS <cvs@retropc.net>