Annotation of os2sdk/demos/examples/beepc/beepc.c, revision 1.1.1.2

1.1       root        1: /*
1.1.1.2 ! root        2:  * Example of DosBeep usage
1.1       root        3:  *
                      4:  * This call generates a tone from the speaker with the specified
                      5:  * frequency and duration. This program works in Family API mode.
                      6:  *
                      7:  * Compile as: cl -AL -Lp -G0 beepc.c
                      8:  *
1.1.1.2 ! root        9:  * Created by Microsoft Corp. 1986
1.1       root       10:  */
                     11: 
1.1.1.2 ! root       12: #define INCL_DOSPROCESS
        !            13: 
        !            14: #include  <os2def.h>
        !            15: #include  <bsedos.h>
1.1       root       16: 
                     17: main()
                     18: {
1.1.1.2 ! root       19:        UINT Frequency;         /* in Hertz  (range 0x25 to 0x7fff) */
        !            20:        UINT Duration;          /* in milliseconds                  */
1.1       root       21: 
                     22:        Frequency = 1000;
                     23:        Duration  =  500;               /* 1/2 second */
                     24: 
1.1.1.2 ! root       25:        DosBeep(Frequency, Duration);   /* Produce tone */
1.1       root       26: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.