home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: How to access the speaker with GCC/2
- Message-ID: <1992Sep2.142817.5515@njitgw.njit.edu>
- Date: 2 Sep 92 14:28:17 GMT
- References: <1992Sep2.122819.14278@neptune.inf.ethz.ch>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 30
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <1992Sep2.122819.14278@neptune.inf.ethz.ch> cbaechle@iiic.ethz.ch (Cedric Baechler HE9CUN) writes:
- >
- >I have the GCC/2 2.1 C compiler and I'd like to write a small program
- >to play Morse code.
- >I don't have any Books about OS/2 so I can't find out how to produce sounds
- >with the speaker.
- >What I need:
- >
- >- A function like: sound(int freq)
-
- DosBeep. It plays a note at the given frequency for the given
- duration. If you need to play notes in parallel with the rest of the
- program, the recommended procedure is to put the music routines in a
- separate thread.
-
- >- a function like: stopsound()
-
- Not necessary with DosBeep.
-
- >- and a function like: void delay(int milliseconds) that wait for the given
- >time.
-
- There is a DosSleep() call which will wait for a given amount of time
- and then go on.
-
- --
- |) David Charlap "TELEPHONE, n. An Invention of the devil which
- /|_ dic5340@hertz.njit.edu abrogates some of the advantages of making a
- ((|,) disagreeable person keep his distance."
- ~|~ --- Ambrose Bierce, The Devil's Dictionary
-