home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4672 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: How to access the speaker with GCC/2
  5. Message-ID: <1992Sep2.142817.5515@njitgw.njit.edu>
  6. Date: 2 Sep 92 14:28:17 GMT
  7. References: <1992Sep2.122819.14278@neptune.inf.ethz.ch>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 30
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <1992Sep2.122819.14278@neptune.inf.ethz.ch> cbaechle@iiic.ethz.ch (Cedric Baechler HE9CUN) writes:
  14. >
  15. >I have the GCC/2 2.1 C compiler and I'd like to write a small program
  16. >to play Morse code.
  17. >I don't have any Books about OS/2 so I can't find out how to produce sounds
  18. >with the speaker.
  19. >What I need:
  20. >
  21. >- A function like: sound(int freq)
  22.  
  23. DosBeep.  It plays a note at the given frequency for the given
  24. duration.  If you need to play notes in parallel with the rest of the
  25. program, the recommended procedure is to put the music routines in a
  26. separate thread.
  27.  
  28. >- a function like: stopsound()
  29.  
  30. Not necessary with DosBeep.
  31.  
  32. >- and a function like: void delay(int milliseconds) that wait for the given
  33. >time.
  34.  
  35. There is a DosSleep() call which will wait for a given amount of time
  36. and then go on.
  37.  
  38. -- 
  39.    |)  David Charlap           "TELEPHONE, n.  An Invention of the devil which
  40.   /|_  dic5340@hertz.njit.edu   abrogates some of the advantages of making a
  41.  ((|,)                          disagreeable person keep his distance."
  42.   ~|~                              --- Ambrose Bierce, The Devil's Dictionary
  43.