home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / windows3 / mtlabsnd.zip / COPY.C < prev    next >
C/C++ Source or Header  |  1993-04-26  |  1KB  |  74 lines

  1. /*
  2.  * July 5, 1991
  3.  * Copyright 1991 Lance Norskog And Sundry Contributors
  4.  * This source code is freely redistributable and may be used for
  5.  * any purpose.  This copyright notice must be maintained. 
  6.  * Lance Norskog And Sundry Contributors are not responsible for 
  7.  * the consequences of using this software.
  8.  */
  9.  
  10. /*
  11.  * Sound Tools skeleton effect file.
  12.  */
  13.  
  14. #include "st.h"
  15.  
  16. /*
  17.  * Process options
  18.  */
  19. copy_getopts(effp, n, argv) 
  20. eff_t effp;
  21. int n;
  22. char **argv;
  23. {
  24.     if (n)
  25.         fail("Copy effect takes no options.");
  26. }
  27.  
  28. /*
  29.  * Start processing
  30.  */
  31. copy_start(effp)
  32. eff_t effp;
  33. {
  34.     /* nothing to do */
  35.     /* stuff data into delaying effects here */
  36. }
  37.  
  38. /*
  39.  * Read up to len samples from file.
  40.  * Convert to signed longs.
  41.  * Place in buf[].
  42.  * Return number of samples read.
  43.  */
  44.  
  45. copy_flow(effp, ibuf, obuf, isamp, osamp)
  46. eff_t effp;
  47. long *ibuf, *obuf;
  48. int *isamp, *osamp;
  49. {
  50.     int done,t;
  51.     
  52.     done = ((*isamp < *osamp) ? *isamp : *osamp);
  53.     for(t = 0; t < done; t++)
  54.         obuf[t] = ibuf[t];
  55.  
  56. /*    bcopy(ibuf, obuf, done * sizeof(long));     */
  57.     *isamp = *osamp = done;
  58.     return done;
  59. }
  60.  
  61. /*
  62.  * Do anything required when you stop reading samples.  
  63.  * Don't close input file! 
  64.  */
  65. copy_stop(effp)
  66. eff_t effp;
  67. {
  68.     /* nothing to do */
  69. }
  70.  
  71.  
  72.  
  73.  
  74.