Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

sirens.c File Reference

#include "precomp.h"

Go to the source code of this file.

Defines

#define TONE_HIGH_FREQ   2000
#define TONE_HIGH_LEN   75
#define TONE_LOW_FREQ   500
#define TONE_LOW_LEN   75
#define TONE_CLICK_FREQ   400
#define TONE_CLICK_LEN   4
#define TONE_SILENT   10
#define SIREN_LOW_FREQ   1200
#define SIREN_HIGH_FREQ   2000
#define SIREN_INTERVAL   100

Functions

BOOL HighBeep (void)
BOOL LowBeep (void)
BOOL KeyClick (void)
BOOL UpSiren (void)
BOOL DownSiren (void)
BOOL DoBeep (BEEPPROC BeepProc, UINT Count)


Define Documentation

#define SIREN_HIGH_FREQ   2000
 

Definition at line 24 of file sirens.c.

Referenced by DownSiren(), and UpSiren().

#define SIREN_INTERVAL   100
 

Definition at line 25 of file sirens.c.

Referenced by DownSiren(), and UpSiren().

#define SIREN_LOW_FREQ   1200
 

Definition at line 23 of file sirens.c.

Referenced by DownSiren(), and UpSiren().

#define TONE_CLICK_FREQ   400
 

Definition at line 20 of file sirens.c.

Referenced by KeyClick().

#define TONE_CLICK_LEN   4
 

Definition at line 21 of file sirens.c.

Referenced by KeyClick().

#define TONE_HIGH_FREQ   2000
 

Definition at line 16 of file sirens.c.

Referenced by HighBeep().

#define TONE_HIGH_LEN   75
 

Definition at line 17 of file sirens.c.

Referenced by HighBeep().

#define TONE_LOW_FREQ   500
 

Definition at line 18 of file sirens.c.

Referenced by LowBeep().

#define TONE_LOW_LEN   75
 

Definition at line 19 of file sirens.c.

Referenced by LowBeep().

#define TONE_SILENT   10
 

Definition at line 22 of file sirens.c.


Function Documentation

BOOL DoBeep BEEPPROC  BeepProc,
UINT  Count
 

Definition at line 128 of file sirens.c.

References BOOL, Count, TRUE, and UserSleep().

Referenced by xxxProcessEventMessage().

00129 { 00130 while (Count--) { 00131 (*BeepProc)(); 00132 UserSleep(100); 00133 } 00134 return TRUE; 00135 }

BOOL DownSiren void   ) 
 

Definition at line 112 of file sirens.c.

References BOOL, DWORD, EnterCrit, LeaveCrit, SIREN_HIGH_FREQ, SIREN_INTERVAL, SIREN_LOW_FREQ, TRUE, and UserBeep().

00113 { 00114 DWORD freq; 00115 BOOL BeepStatus = TRUE; 00116 00117 LeaveCrit(); 00118 00119 for (freq = SIREN_HIGH_FREQ; 00120 BeepStatus && freq >= SIREN_LOW_FREQ; 00121 freq -= SIREN_INTERVAL) { 00122 BeepStatus = UserBeep(freq, (DWORD)1); 00123 } 00124 EnterCrit(); 00125 return BeepStatus; 00126 }

BOOL HighBeep void   ) 
 

Definition at line 35 of file sirens.c.

References BOOL, EnterCrit, LeaveCrit, Status, TONE_HIGH_FREQ, TONE_HIGH_LEN, and UserBeep().

00036 { 00037 BOOL Status; 00038 00039 LeaveCrit(); 00040 Status = UserBeep(TONE_HIGH_FREQ, TONE_HIGH_LEN); 00041 EnterCrit(); 00042 return Status; 00043 }

BOOL KeyClick void   ) 
 

Definition at line 71 of file sirens.c.

References BOOL, EnterCrit, LeaveCrit, Status, TONE_CLICK_FREQ, TONE_CLICK_LEN, and UserBeep().

00072 { 00073 BOOL Status; 00074 00075 LeaveCrit(); 00076 Status = UserBeep(TONE_CLICK_FREQ, TONE_CLICK_LEN); 00077 EnterCrit(); 00078 return Status; 00079 }

BOOL LowBeep void   ) 
 

Definition at line 53 of file sirens.c.

References BOOL, EnterCrit, LeaveCrit, Status, TONE_LOW_FREQ, TONE_LOW_LEN, and UserBeep().

00054 { 00055 BOOL Status; 00056 00057 LeaveCrit(); 00058 Status = UserBeep(TONE_LOW_FREQ, TONE_LOW_LEN); 00059 EnterCrit(); 00060 return Status; 00061 }

BOOL UpSiren void   ) 
 

Definition at line 89 of file sirens.c.

References BOOL, DWORD, EnterCrit, LeaveCrit, SIREN_HIGH_FREQ, SIREN_INTERVAL, SIREN_LOW_FREQ, TRUE, and UserBeep().

00090 { 00091 DWORD freq; 00092 BOOL BeepStatus = TRUE; 00093 00094 LeaveCrit(); 00095 for (freq = SIREN_LOW_FREQ; 00096 BeepStatus && freq <= SIREN_HIGH_FREQ; 00097 freq += SIREN_INTERVAL) { 00098 BeepStatus = UserBeep(freq, (DWORD)1); 00099 } 00100 EnterCrit(); 00101 return BeepStatus; 00102 }


Generated on Sat May 15 19:45:39 2004 for test by doxygen 1.3.7