File:  [OS/2 SDKs] / os2sdk / demos / examples / beepc / beepc.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:18 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
Microsoft OS/2 SDK 03-01-1988

/*
 * Example of DosBeep usage
 *
 * This call generates a tone from the speaker with the specified
 * frequency and duration. This program works in Family API mode.
 *
 * Compile as: cl -AL -Lp -G0 beepc.c
 *
 * Created by Microsoft Corp. 1986
 */

#define INCL_DOSPROCESS

#include  <os2def.h>
#include  <bsedos.h>

main()
{
	UINT Frequency; 	/* in Hertz  (range 0x25 to 0x7fff) */
	UINT Duration;		/* in milliseconds		    */

	Frequency = 1000;
	Duration  =  500;		/* 1/2 second */

	DosBeep(Frequency, Duration);	/* Produce tone */
}

unix.superglobalmegacorp.com

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