home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 5.ddi / C / UTSOUND.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  857 b   |  34 lines

  1. /**
  2. *
  3. * Name        utsound -- Generate a sound through the speaker
  4. *
  5. * Synopsis    utsound(freq,duration);
  6. *
  7. *        unsigned freq      The desired frequency in Hertz.
  8. *        unsigned duration The duration in clock ticks.
  9. *
  10. * Description    This function produces a sound through the speaker with
  11. *        a frequency of freq Hertz (cycles per second).    The
  12. *        sound is produced for duration ticks (there are
  13. *        approximately 18.2 clock ticks per second).  UTSOUND is
  14. *        similiar to the BASICA sound statement, but UTSOUND does
  15. *        not provide for buffering of commands.
  16. *
  17. * Returns    (None.    Function return type is void.)
  18. *
  19. * Version    3.0  (C)Copyright Blaise Computing Inc.  1984, 1986
  20. *
  21. **/
  22.  
  23. #include <butility.h>
  24.  
  25. void utsound(freq,duration)
  26. unsigned freq,duration;
  27. {
  28.     unsigned utsleep();
  29.  
  30.     utspkon(freq);
  31.     utsleep(duration);
  32.     utspkoff();
  33. }
  34.