Annotation of sbbs/src/xpdev/xpbeep.h, revision 1.1.1.1

1.1       root        1: /* $Id: xpbeep.h,v 1.10 2006/05/27 06:59:47 deuce Exp $ */
                      2: 
                      3: #ifndef _XPBEEP_H_
                      4: #define _XPBEEP_H_
                      5: 
                      6: #include "gen_defs.h"
                      7: 
                      8: #if defined(_WIN32)
                      9:        #if 0
                     10:        #define BEEP(freq,dur)  xpbeep((double)(freq),(DWORD)(dur))
                     11:        #else
                     12:        #define BEEP(freq,dur)  Beep((DWORD)(freq),(DWORD)(dur))
                     13:        #endif
                     14: #elif defined(__OS2__)
                     15:        #define BEEP(freq,dur)  DosBeep(freq,dur)
                     16: #elif defined(__unix__) || defined(__APPLE__)
                     17:        #define BEEP(freq,dur)  xpbeep((double)(freq),(DWORD)(dur))
                     18: #else
                     19:        #error "Unsupported Target: Need some macros and/or function prototypes here."
                     20: #endif
                     21: 
                     22: enum WAVE_SHAPE {
                     23:         WAVE_SHAPE_SINE
                     24:        ,WAVE_SHAPE_SAWTOOTH
                     25:        ,WAVE_SHAPE_SQUARE
                     26:        ,WAVE_SHAPE_SINE_SAW
                     27:        ,WAVE_SHAPE_SINE_HARM
                     28:        ,WAVE_SHAPE_SINE_SAW_CHORD
                     29:        ,WAVE_SHAPE_SINE_SAW_HARM
                     30: };
                     31: 
                     32: 
                     33: #ifdef __cplusplus
                     34: extern "C" {
                     35: #endif
                     36: BOOL xptone_open(void);
                     37: BOOL xptone_close(void);
                     38: void xpbeep(double freq, DWORD duration);
                     39: BOOL xptone(double freq, DWORD duration, enum WAVE_SHAPE);
                     40: #ifdef __unix__
                     41: void unix_beep(int freq, int dur);
                     42: #endif
                     43: #ifdef __cplusplus
                     44: }
                     45: #endif
                     46: 
                     47: #endif

unix.superglobalmegacorp.com

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