home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / misc / 43448 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.5 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: MMPM/2 and PC speaker
  5. Message-ID: <1993Jan21.201216.21162@njitgw.njit.edu>
  6. Date: 21 Jan 93 20:12:16 GMT
  7. References: <1993Jan17.005410.1297@yvax.byu.edu>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 27
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <1993Jan17.005410.1297@yvax.byu.edu> hayesb@yvax.byu.edu writes:
  14. >I just installed the 2.1b and don't have any drivers for the PC speaker.  I
  15. >don't have any type of sound card and was wondering if sounds can be played
  16. >through the PC speaker in both MMPM/2 and a WIN-OS2 session.  Any help would be
  17. >appreciated.
  18.  
  19. There exists the DosBeep() function for simple beeping type sounds.  You
  20. can get a useable range of sounds with that (ask any Turbo Pascal 3.x
  21. programmer!).  As for digitized sound, the timings involved are too
  22. critical for any multitasker to handle properly.
  23.  
  24. Just in case you don't have documentation, this call is simple:
  25.  
  26. DosBeep(note, duration);
  27.  
  28. Where note is the frequency in Hz, and duration is the length of the
  29. note in milliseconds.  So
  30.  
  31.     DosBeep( 500,100); 
  32.     DosBeep(1000,300);
  33.  
  34. makes a nice little "ta-da!" type sound effect.  Etc.
  35. -- 
  36.   |)  David Charlap          | .signature confiscated by FBI due to
  37.  /|_  dic5340@hertz.njit.edu | an ongoing investigation into the
  38. ((|,)                        | source of these .signature virusses
  39.  ~|~
  40.